| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 15 | final class UseCaseBuilder extends AbstractBuilder |
||
| 16 | 7 | { |
|
| 17 | public function __construct(SchemaInterface $schema, string $action) |
||
| 18 | { |
||
| 19 | 7 | $entity = $this->getPascalCase($this->getSingularize($schema->name())); |
|
| 20 | $action = $this->getPascalCase($action); |
||
| 21 | 7 | $name = $this->getDashCase($this->getSingularize($schema->name())); |
|
| 22 | $pkName = $this->getCamelCase($schema->pkName()); |
||
| 23 | |||
| 24 | parent::__construct(\compact('entity', 'action', 'name', 'pkName')); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function build(): string |
||
| 28 | { |
||
| 29 | return \rtrim(parent::build()); |
||
| 30 | } |
||
| 31 | |||
| 32 | protected function getFileTemplate(): string |
||
| 35 | } |
||
| 36 | |||
| 37 | protected function getPathTemplate(): string |
||
| 42 |