@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function generateCacheKeys(string $key, string $query, array $params = []): array |
26 | 26 | { |
27 | - $realCacheKey = $key . 'query=' . $query . '¶ms=' . hash('sha256', serialize($params)); |
|
27 | + $realCacheKey = $key.'query='.$query.'¶ms='.hash('sha256', serialize($params)); |
|
28 | 28 | |
29 | 29 | return [sha1($realCacheKey), $realCacheKey]; |
30 | 30 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | foreach ($properties as $property => $value) { |
21 | 21 | /** @psalm-var string $property */ |
22 | 22 | if (property_exists(static::class, $property)) { |
23 | - $method = 'set' . str_replace( |
|
23 | + $method = 'set'.str_replace( |
|
24 | 24 | ' ', |
25 | 25 | '', |
26 | 26 | mb_convert_case( |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | foreach ($aliases as $alias => $values) { |
71 | 71 | /** @var string $cacheKey */ |
72 | - [$cacheKey,] = $this->cacher->generateCacheKeys( |
|
72 | + [$cacheKey, ] = $this->cacher->generateCacheKeys( |
|
73 | 73 | self::CACHE_FIELD, |
74 | 74 | $this->currentQueryBuilder->getDQL(), |
75 | 75 | ['query' => "[{$expr}][{$alias}]"] |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | foreach ($conditions as $alias => $value) { |
102 | 102 | $snakeCaseExprMethod = 'order_by'; |
103 | 103 | /** @var string $cacheKey */ |
104 | - [$cacheKey,] = $this->cacher->generateCacheKeys( |
|
104 | + [$cacheKey, ] = $this->cacher->generateCacheKeys( |
|
105 | 105 | self::CACHE_FIELD, |
106 | 106 | $this->currentQueryBuilder->getDQL(), |
107 | 107 | ['query' => "[{$snakeCaseExprMethod}][{$alias}]"] |
@@ -130,8 +130,8 @@ discard block |
||
130 | 130 | private function createField(string $tableAliasAndColumnName, string $expr): Query\Field |
131 | 131 | { |
132 | 132 | foreach ($this->getAliasesAndMetadata() as $alias => $metadata) { |
133 | - if (0 === strncasecmp($tableAliasAndColumnName, $alias . '_', mb_strlen($alias . '_'))) { |
|
134 | - $columnName = mb_substr($tableAliasAndColumnName, mb_strlen($alias . '_')); |
|
133 | + if (0 === strncasecmp($tableAliasAndColumnName, $alias.'_', mb_strlen($alias.'_'))) { |
|
134 | + $columnName = mb_substr($tableAliasAndColumnName, mb_strlen($alias.'_')); |
|
135 | 135 | |
136 | 136 | if (\array_key_exists($columnName, $metadata->fieldNames)) { |
137 | 137 | return (new Query\Field($expr, $metadata->getName(), $alias)) |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | } |
142 | 142 | |
143 | - throw new \InvalidArgumentException($tableAliasAndColumnName . ' not allowed'); |
|
143 | + throw new \InvalidArgumentException($tableAliasAndColumnName.' not allowed'); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | private function getAliasesAndMetadata(): array |
153 | 153 | { |
154 | - [$cacheKey,] = $this->cacher->generateCacheKeys(self::CACHE_METADATA, $this->currentQueryBuilder->getDQL()); |
|
154 | + [$cacheKey, ] = $this->cacher->generateCacheKeys(self::CACHE_METADATA, $this->currentQueryBuilder->getDQL()); |
|
155 | 155 | if (!\is_array($aliasesAndMetadata = $this->cacher->fetchCache($cacheKey))) { |
156 | 156 | $aliasesAndMetadata = []; |
157 | 157 | /** @var string $alias */ |