Skip to content

Commit 381524e

Browse files
authored
Merge pull request #27 from weierophinney/feature/add-param-hints
Adds parameter typehints to ContainerInterface
2 parents b1fbdff + 2a09c4c commit 381524e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
],
1414
"require": {
15-
"php": ">=5.3.0"
15+
"php": ">=7.2.0"
1616
},
1717
"autoload": {
1818
"psr-4": {
@@ -21,7 +21,7 @@
2121
},
2222
"extra": {
2323
"branch-alias": {
24-
"dev-master": "1.0.x-dev"
24+
"dev-master": "1.1.x-dev"
2525
}
2626
}
2727
}

src/ContainerInterface.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Psr\Container;
46

57
/**
@@ -17,7 +19,7 @@ interface ContainerInterface
1719
*
1820
* @return mixed Entry.
1921
*/
20-
public function get($id);
22+
public function get(string $id);
2123

2224
/**
2325
* Returns true if the container can return an entry for the given identifier.
@@ -30,5 +32,5 @@ public function get($id);
3032
*
3133
* @return bool
3234
*/
33-
public function has($id);
35+
public function has(string $id);
3436
}

0 commit comments

Comments
 (0)