| @@ 31-46 (lines=16) @@ | ||
| 28 | /** |
|
| 29 | * {@inheritdoc} |
|
| 30 | */ |
|
| 31 | public function getRequiredParameters(): array |
|
| 32 | { |
|
| 33 | if ($this->handlerReflectionClass->getConstructor() === null) { |
|
| 34 | return []; |
|
| 35 | } |
|
| 36 | ||
| 37 | return $this->getReflectionParametersFromReflectionClass()->reject( |
|
| 38 | function (ReflectionParameter $constructorParameter) { |
|
| 39 | return $constructorParameter->isOptional(); |
|
| 40 | } |
|
| 41 | )->map( |
|
| 42 | function (ReflectionParameter $constructorParameter) { |
|
| 43 | return $constructorParameter->name; |
|
| 44 | } |
|
| 45 | )->all(); |
|
| 46 | } |
|
| 47 | ||
| 48 | /** |
|
| 49 | * {@inheritdoc} |
|
| @@ 51-62 (lines=12) @@ | ||
| 48 | /** |
|
| 49 | * {@inheritdoc} |
|
| 50 | */ |
|
| 51 | public function getConstructorParameters(array $config): array |
|
| 52 | { |
|
| 53 | if ($this->handlerReflectionClass->getConstructor() === null) { |
|
| 54 | return []; |
|
| 55 | } |
|
| 56 | ||
| 57 | return $this->getReflectionParametersFromReflectionClass()->map( |
|
| 58 | function (ReflectionParameter $constructorParameter) use ($config) { |
|
| 59 | return $this->resolveConstructorParameterValue($constructorParameter, $config); |
|
| 60 | } |
|
| 61 | )->all(); |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * {@inheritdoc} |
|