| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | class SimpleProvider implements DataProviderInterface |
||
| 7 | { |
||
| 8 | use NamingTrait; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | protected $entityClassName; |
||
| 14 | |||
| 15 | public function __construct(string $entityClassName) |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @return array |
||
| 22 | * @throws \ReflectionException |
||
| 23 | */ |
||
| 24 | public function provide(): array |
||
| 25 | { |
||
| 26 | return [ |
||
| 27 | 'ns' => $this->getNs($this->entityClassName), |
||
| 28 | 'useStatement' => ltrim($this->entityClassName, '\\'), |
||
| 29 | 'entityName' => $this->getBaseName($this->entityClassName), |
||
| 30 | ]; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $type |
||
| 35 | * @return string |
||
| 36 | * @throws \ReflectionException |
||
| 37 | */ |
||
| 38 | public function getClassName(string $type): string |
||
| 47 | } |
||
| 48 | } |
||
| 49 |