@@ -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( |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | foreach ($aliases as $alias => $values) { |
54 | 54 | /** @var string $cacheKey */ |
55 | - [$cacheKey,] = $this->cacher->generateCacheKeys( |
|
55 | + [$cacheKey, ] = $this->cacher->generateCacheKeys( |
|
56 | 56 | self::CACHE_FIELD, |
57 | 57 | $this->currentQueryBuilder->getSQL(), |
58 | 58 | ['query' => "[{$expr}][{$alias}]"] |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | foreach ($conditions as $alias => $value) { |
81 | 81 | $snakeCaseExprMethod = 'order_by'; |
82 | 82 | /** @var string $cacheKey */ |
83 | - [$cacheKey,] = $this->cacher->generateCacheKeys( |
|
83 | + [$cacheKey, ] = $this->cacher->generateCacheKeys( |
|
84 | 84 | self::CACHE_FIELD, |
85 | 85 | $this->currentQueryBuilder->getSQL(), |
86 | 86 | ['query' => "[{$snakeCaseExprMethod}][{$alias}]"] |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | * @var string $alias |
112 | 112 | */ |
113 | 113 | foreach ($this->getTableAliases() as $tableName => $alias) { |
114 | - if (0 === strncasecmp($tableAliasAndColumnName, $alias . '_', mb_strlen($alias . '_'))) { |
|
115 | - $columnName = mb_substr($tableAliasAndColumnName, mb_strlen($alias . '_')); |
|
114 | + if (0 === strncasecmp($tableAliasAndColumnName, $alias.'_', mb_strlen($alias.'_'))) { |
|
115 | + $columnName = mb_substr($tableAliasAndColumnName, mb_strlen($alias.'_')); |
|
116 | 116 | $columns = $this->getColumnsNamesByTable($tableName); |
117 | 117 | if (!\in_array($columnName, $columns, true)) { |
118 | 118 | throw new \InvalidArgumentException("{$columnName} not exist in {$tableName}."); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } |
123 | 123 | } |
124 | 124 | |
125 | - throw new \InvalidArgumentException($tableAliasAndColumnName . ' not allowed'); |
|
125 | + throw new \InvalidArgumentException($tableAliasAndColumnName.' not allowed'); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | private function getTableAliases(): array |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /** @var string $alias */ |
143 | 143 | $alias = $item['alias']; |
144 | 144 | |
145 | - $tableAliases[$table] = $alias ; |
|
145 | + $tableAliases[$table] = $alias; |
|
146 | 146 | } |
147 | 147 | } |
148 | 148 |