| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 6 | private function _extractAggregate(string $name) : string |
|
| 36 | { |
||
| 37 | 6 | $replaced = 0; |
|
| 38 | 6 | $extractedName = \preg_replace('/\((.*?)\)/', '#$1', $name, 1, $replaced); |
|
| 39 | 6 | if ($replaced === 0) |
|
| 40 | { |
||
| 41 | 3 | return \str_replace('.', '_', \mb_strtolower($extractedName)); |
|
| 42 | } |
||
| 43 | |||
| 44 | 3 | $parts = \explode('#', $extractedName); |
|
| 45 | 3 | $this->aggregate = \mb_strtolower($parts[0]); |
|
| 46 | |||
| 47 | 3 | return \str_replace('.', '_', \mb_strtolower($parts[1])); |
|
| 48 | } |
||
| 49 | } |