| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 18 | public function __construct(SchemaInterface $schema, string $action) |
||
| 19 | { |
||
| 20 | $entity = $this->getInflector()->entity($schema->name()); |
||
| 21 | $action = $this->getInflector()->pascalAction($action); |
||
| 22 | $command = $this->getInflector()->commandName($entity, $action); |
||
| 23 | $properties = \array_reduce($schema->attributes(), function ($result, SchemaAttributeInterface $property) { |
||
| 24 | $result[$property->name()] = $property; |
||
| 25 | |||
| 26 | return $result; |
||
| 27 | }, []); |
||
| 28 | |||
| 29 | parent::__construct(\compact('entity', 'action', 'properties', 'command')); |
||
| 30 | } |
||
| 42 |