Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class UniqueNameFactory |
||
13 | { |
||
14 | /** |
||
15 | * @var int[] |
||
16 | */ |
||
17 | private array $aliasCount = []; |
||
18 | |||
19 | private int $parameterCount = 1; |
||
20 | |||
21 | /** |
||
22 | * Return a string to be used as parameter name in a query. |
||
23 | */ |
||
24 | 32 | public function createParameterName(): string |
|
25 | { |
||
26 | 32 | return 'filter' . $this->parameterCount++; |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * Return a string to be used as alias name in a query. |
||
31 | */ |
||
32 | 25 | public function createAliasName(string $className): string |
|
40 | } |
||
41 | } |
||
42 |