| Total Complexity | 6 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 66.67% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class RequiredParameter extends DefaultReference { |
||
| 15 | private $parameter; |
||
| 16 | private $function; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * RequiredParameter constructor. |
||
| 20 | * |
||
| 21 | * @param \ReflectionParameter $param The required parameter. |
||
| 22 | */ |
||
| 23 | 7 | public function __construct(\ReflectionParameter $param) { |
|
| 24 | 7 | parent::__construct($param->getClass() ? $param->getClass()->name : ''); |
|
| 25 | |||
| 26 | 7 | $this->parameter = $param->name; |
|
| 27 | 7 | $this->function = ($param->getDeclaringClass() ? $param->getDeclaringClass()->name.'::' : ''). |
|
| 28 | 7 | $param->getDeclaringFunction()->name.'()'; |
|
| 29 | 7 | } |
|
| 30 | |||
| 31 | |||
| 32 | /** |
||
| 33 | * Get the name. |
||
| 34 | * |
||
| 35 | * @return string Returns the name. |
||
| 36 | */ |
||
| 37 | public function getParameter() { |
||
| 38 | return $this->parameter; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get the function. |
||
| 43 | * |
||
| 44 | * @return string Returns the function. |
||
| 45 | */ |
||
| 46 | public function getFunction() { |
||
| 47 | return $this->function; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * {@inheritdoc} |
||
| 52 | * |
||
| 53 | * @throws MissingArgumentException Always throws an exception. |
||
| 54 | */ |
||
| 55 | 2 | public function resolve(Container $container, $_ = null) { |
|
| 57 | } |
||
| 58 | } |
||
| 59 |