| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | final class AbstractFactory implements ConfigPartInterface |
||
| 12 | { |
||
| 13 | const PART_KEY = \Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory::class; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var DataProviderInterface |
||
| 17 | */ |
||
| 18 | private $dataProvider; |
||
| 19 | |||
| 20 | 2 | public function __construct(DataProviderInterface $dataProvider) |
|
| 23 | 2 | } |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @inheritdoc |
||
| 27 | */ |
||
| 28 | 2 | public function getConfig(): array |
|
| 29 | { |
||
| 30 | 2 | $name = '\\' . $this->getControllerNamespace() . '\Update' . $this->getEntityClassName() . 'Action::class'; |
|
| 31 | return [ |
||
| 32 | 2 | $name => [ |
|
| 33 | 2 | new PhpLiteral('\SlayerBirden\DataFlowServer\Doctrine\Persistence\EntityManagerRegistry::class'), |
|
| 34 | 2 | $this->dataProvider->provide()['hydrator_name'], |
|
| 35 | LoggerInterface::class, |
||
| 36 | ] |
||
| 37 | ]; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @inheritdoc |
||
| 42 | */ |
||
| 43 | 2 | public function getCode(): string |
|
| 46 | } |
||
| 47 | |||
| 48 | 2 | private function getEntityClassName(): string |
|
| 51 | } |
||
| 52 | |||
| 53 | 2 | private function getControllerNamespace(): string |
|
| 58 |