@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | return $this->get($type)->toDatabase($value); |
155 | 155 | } |
156 | 156 | |
157 | - throw new TypeException(gettype($value), 'Cannot convert to database the value : ' . print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
157 | + throw new TypeException(gettype($value), 'Cannot convert to database the value : '.print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /** |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | return null; |
177 | 177 | } |
178 | 178 | |
179 | - throw new TypeException(gettype($value), 'Cannot convert to php the value : ' . print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
179 | + throw new TypeException(gettype($value), 'Cannot convert to php the value : '.print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
@@ -88,7 +88,7 @@ |
||
88 | 88 | $this->remove($attribute); |
89 | 89 | } |
90 | 90 | |
91 | - $this->criteria[$filter] = $value; |
|
91 | + $this->criteria[$filter] = $value; |
|
92 | 92 | $this->inputs[$attribute][] = $filter; |
93 | 93 | } |
94 | 94 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | foreach ($data as $attribute => $value) { |
29 | - $method = 'set' . ucfirst($attribute); |
|
29 | + $method = 'set'.ucfirst($attribute); |
|
30 | 30 | $exists = property_exists($this, $attribute); |
31 | 31 | |
32 | 32 | if ($exists && $this->$attribute instanceof ImportableInterface && !$value instanceof ImportableInterface) { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | * |
40 | 40 | * @param string $type |
41 | 41 | */ |
42 | - public function declare(string $type): void |
|
42 | + public function declare(string$type): void |
|
43 | 43 | { |
44 | 44 | if (isset($this->declaredTypes[$type])) { |
45 | 45 | return; |
@@ -64,7 +64,7 @@ |
||
64 | 64 | |
65 | 65 | // Replace 'adapter' with 'driver' and add 'pdo_' |
66 | 66 | if (isset($parameters['adapter'])) { |
67 | - $parameters['driver'] = 'pdo_' . $parameters['adapter']; |
|
67 | + $parameters['driver'] = 'pdo_'.$parameters['adapter']; |
|
68 | 68 | unset($parameters['adapter']); |
69 | 69 | } |
70 | 70 |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | foreach ($query->statements['tables'] as $table) { |
187 | 187 | return $query->state()->compiled = 'UPDATE ' |
188 | 188 | . $this->quoteIdentifier($query, $table['table']) |
189 | - . ' SET ' . implode(', ', $values) |
|
189 | + . ' SET '.implode(', ', $values) |
|
190 | 190 | . $this->compileWhere($query) |
191 | 191 | ; |
192 | 192 | } |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | $from['sql'] = $this->quoteIdentifier($query, $databasePrefix.$from['table']); |
525 | 525 | $compiled[$from['table']] = $from; |
526 | 526 | } else { |
527 | - $from['sql'] = $this->quoteIdentifier($query, $databasePrefix.$from['table']) . ' ' . $this->quoteIdentifier($query, $from['alias']); |
|
527 | + $from['sql'] = $this->quoteIdentifier($query, $databasePrefix.$from['table']).' '.$this->quoteIdentifier($query, $from['alias']); |
|
528 | 528 | $compiled[$from['alias']] = $from; |
529 | 529 | } |
530 | 530 | } |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | if (is_array($value)) { |
698 | 698 | return $this->compileIntoExpression($query, $value, $column, 'REGEXP', $converted); |
699 | 699 | } |
700 | - return $this->quoteIdentifier($query, $column).' REGEXP '.$this->compileExpressionValue($query, (string)$value, $converted); |
|
700 | + return $this->quoteIdentifier($query, $column).' REGEXP '.$this->compileExpressionValue($query, (string) $value, $converted); |
|
701 | 701 | |
702 | 702 | // LIKE |
703 | 703 | case ':like': |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | |
771 | 771 | // Unsupported operator |
772 | 772 | default: |
773 | - throw new UnexpectedValueException("Unsupported operator '" . $operator . "' in WHERE clause"); |
|
773 | + throw new UnexpectedValueException("Unsupported operator '".$operator."' in WHERE clause"); |
|
774 | 774 | } |
775 | 775 | } |
776 | 776 | |
@@ -858,7 +858,7 @@ discard block |
||
858 | 858 | $sql = '('.$this->compileSelect($query).')'; |
859 | 859 | |
860 | 860 | if ($alias) { |
861 | - $sql = $sql . ' as ' . $this->quoteIdentifier($clause, $alias); |
|
861 | + $sql = $sql.' as '.$this->quoteIdentifier($clause, $alias); |
|
862 | 862 | } |
863 | 863 | |
864 | 864 | $this->addQueryBindings($clause, $query); |
@@ -1016,12 +1016,12 @@ discard block |
||
1016 | 1016 | if ($lock !== null && !$query->statements['aggregate']) { |
1017 | 1017 | // Lock for update |
1018 | 1018 | if ($lock === LockMode::PESSIMISTIC_WRITE) { |
1019 | - return ' ' . $this->platform()->grammar()->getWriteLockSQL(); |
|
1019 | + return ' '.$this->platform()->grammar()->getWriteLockSQL(); |
|
1020 | 1020 | } |
1021 | 1021 | |
1022 | 1022 | // Shared Lock: other process can read the row but not update it. |
1023 | 1023 | if ($lock === LockMode::PESSIMISTIC_READ) { |
1024 | - return ' ' . $this->platform()->grammar()->getReadLockSQL(); |
|
1024 | + return ' '.$this->platform()->grammar()->getReadLockSQL(); |
|
1025 | 1025 | } |
1026 | 1026 | } |
1027 | 1027 |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | return $entity; |
133 | 133 | } |
134 | 134 | |
135 | - throw new EntityNotFoundException('Cannot resolve entity identifier "'.implode('", "', (array)$id).'"'); |
|
135 | + throw new EntityNotFoundException('Cannot resolve entity identifier "'.implode('", "', (array) $id).'"'); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | public function with(ReadCommandInterface $query, $relations) |
180 | 180 | { |
181 | - $this->withRelations = Relation::sanitizeRelations((array)$relations); |
|
181 | + $this->withRelations = Relation::sanitizeRelations((array) $relations); |
|
182 | 182 | |
183 | 183 | return $query; |
184 | 184 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | */ |
194 | 194 | public function without(ReadCommandInterface $query, $relations) |
195 | 195 | { |
196 | - $this->withoutRelations = Relation::sanitizeWithoutRelations((array)$relations); |
|
196 | + $this->withoutRelations = Relation::sanitizeWithoutRelations((array) $relations); |
|
197 | 197 | |
198 | 198 | return $query; |
199 | 199 | } |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | $scopes = $this->repository->scopes(); |
297 | 297 | |
298 | 298 | if (!isset($scopes[$name])) { |
299 | - throw new BadMethodCallException('Scope "' . get_class($this->mapper) . '::' . $name . '" not found'); |
|
299 | + throw new BadMethodCallException('Scope "'.get_class($this->mapper).'::'.$name.'" not found'); |
|
300 | 300 | } |
301 | 301 | |
302 | 302 | return $scopes[$name](...$arguments); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | #[WriteOperation] |
211 | 211 | public function saveAll($relations = []): int |
212 | 212 | { |
213 | - return $this->relation->saveAll($this->owner, (array)$relations); |
|
213 | + return $this->relation->saveAll($this->owner, (array) $relations); |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | /** |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | #[WriteOperation] |
227 | 227 | public function deleteAll($relations = []): int |
228 | 228 | { |
229 | - return $this->relation->deleteAll($this->owner, (array)$relations); |
|
229 | + return $this->relation->deleteAll($this->owner, (array) $relations); |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | /** |
@@ -245,7 +245,7 @@ |
||
245 | 245 | break; |
246 | 246 | |
247 | 247 | default: |
248 | - throw new RuntimeException('Unknown type from relation "' . $relationName . '" in ' . $repository->entityName()); |
|
248 | + throw new RuntimeException('Unknown type from relation "'.$relationName.'" in '.$repository->entityName()); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | return $relation->setOptions($relationMeta); |