|
@@ 25-32 (lines=8) @@
|
| 22 |
|
public function toMethodMetadata(MethodMetadata $methodMetadata) |
| 23 |
|
{ |
| 24 |
|
// Check for argument name input and validity |
| 25 |
|
if (!$this->checkArgumentExists($this->argumentName, $methodMetadata)) { |
| 26 |
|
throw new \InvalidArgumentException( |
| 27 |
|
'@InjectArgument argument "' |
| 28 |
|
. $methodMetadata->classMetadata->className . '::' |
| 29 |
|
. $methodMetadata->name . ' ' |
| 30 |
|
. $this->argumentName . '" does not exists' |
| 31 |
|
); |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
// Check for type input |
| 35 |
|
if ($this->argumentType === null) { |
|
@@ 35-42 (lines=8) @@
|
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
// Check for type input |
| 35 |
|
if ($this->argumentType === null) { |
| 36 |
|
throw new \InvalidArgumentException( |
| 37 |
|
'@InjectArgument argument "' |
| 38 |
|
. $methodMetadata->classMetadata->className . '::' |
| 39 |
|
. $methodMetadata->name . ' ' |
| 40 |
|
. $this->argumentName . '" type not specified' |
| 41 |
|
); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
// Store dependency with fully qualified type name |
| 45 |
|
$methodMetadata->dependencies[$this->argumentName] = $this->buildFullClassName( |