Total Complexity | 5 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class InflectorAggregate implements InflectorAggregateInterface |
||
11 | { |
||
12 | use ContainerAwareTrait; |
||
13 | |||
14 | /** |
||
15 | * @var Inflector[] |
||
16 | */ |
||
17 | protected $inflectors = []; |
||
18 | |||
19 | 12 | public function add(string $type, ?callable $callback = null): Inflector |
|
20 | { |
||
21 | 12 | $inflector = new Inflector($type, $callback); |
|
22 | 12 | $this->inflectors[] = $inflector; |
|
23 | 12 | return $inflector; |
|
24 | } |
||
25 | |||
26 | 42 | public function inflect($object) |
|
38 | } |
||
39 | |||
40 | 45 | public function getIterator(): Generator |
|
43 | } |
||
44 | } |
||
45 |