| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | interface ContainerInterface extends IteratorAggregate, ArrayAccess |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @param string $key |
||
| 24 | * @param mixed $value |
||
| 25 | * |
||
| 26 | * @throws RegisteredKeyException If value with `$key` is already registered |
||
| 27 | * |
||
| 28 | * @return ContainerInterface |
||
| 29 | */ |
||
| 30 | public function add($key, $value); |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param callable $fn |
||
| 34 | */ |
||
| 35 | public function forAll(callable $fn); |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $key |
||
| 39 | * |
||
| 40 | * @return mixed |
||
| 41 | */ |
||
| 42 | public function get($key); |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return array |
||
| 46 | */ |
||
| 47 | public function getAll(); |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param string $key |
||
| 51 | * |
||
| 52 | * @return bool |
||
| 53 | */ |
||
| 54 | public function has($key); |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string $key |
||
| 58 | * @param mixed $value |
||
| 59 | * |
||
| 60 | * @return ContainerInterface |
||
| 61 | */ |
||
| 62 | public function set($key, $value); |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param string $key |
||
| 66 | * |
||
| 67 | * @return ContainerInterface |
||
| 68 | */ |
||
| 69 | public function remove($key); |
||
| 70 | } |
||
| 71 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.