| Total Complexity | 9 |
| Total Lines | 75 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class ContainerAdapter implements ContainerInterface |
||
| 6 | { |
||
| 7 | private $container; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @param object $container |
||
| 11 | */ |
||
| 12 | public function __construct($container = null) |
||
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param object $container |
||
| 19 | */ |
||
| 20 | public function setContainer($container) |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $id |
||
| 27 | * @return mixed |
||
| 28 | * @throws ContainerException |
||
| 29 | */ |
||
| 30 | public function get($id) |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param $id |
||
| 37 | * @param $value |
||
| 38 | */ |
||
| 39 | public function set($id, $value) |
||
| 40 | { |
||
| 41 | $this->container->set($id, $value); |
||
|
|
|||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $id |
||
| 46 | * @return mixed |
||
| 47 | * @throws ContainerException |
||
| 48 | */ |
||
| 49 | public function has($id) |
||
| 50 | { |
||
| 51 | return $this->call('has', $id); |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param $id |
||
| 56 | * @return mixed |
||
| 57 | * @throws ContainerException |
||
| 58 | */ |
||
| 59 | public function make($id) |
||
| 60 | { |
||
| 61 | return $this->call('make', $id); |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param $method |
||
| 66 | * @param $id |
||
| 67 | * |
||
| 68 | * @return mixed |
||
| 69 | * @throws ContainerException |
||
| 70 | */ |
||
| 71 | protected function call($method, $id) |
||
| 80 | } |
||
| 81 | } |
||
| 82 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.