Passed
Push — fix-FRAM-102-disallow-using-sa... ( a4f1ec )
by Vincent
20:15
created
src/Connection/Result/ArrayResultSet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
                 return $this->asClass($options);
61 61
 
62 62
             default:
63
-                throw new DBALException('Unsupported fetch mode ' . $mode);
63
+                throw new DBALException('Unsupported fetch mode '.$mode);
64 64
         }
65 65
     }
66 66
 
Please login to merge, or discard this patch.
src/Connection/SimpleConnection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             return new UpdateResultSet((int) $this->executeStatement($statement, $query->getBindings()));
296 296
         } catch (DriverException $e) {
297 297
             throw new QueryExecutionException(
298
-                'Error on execute : ' . $e->getMessage(),
298
+                'Error on execute : '.$e->getMessage(),
299 299
                 $e->getCode(),
300 300
                 $e,
301 301
                 $e->getQuery() ? $e->getQuery()->getSQL() : null,
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
             }
449 449
         } catch (DriverException $e) {
450 450
             throw new QueryExecutionException(
451
-                'Error on execute : ' . $e->getMessage(),
451
+                'Error on execute : '.$e->getMessage(),
452 452
                 $e->getCode(),
453 453
                 $e,
454 454
                 $e->getQuery() ? $e->getQuery()->getSQL() : null,
Please login to merge, or discard this patch.
src/Entity/Hydrator/ArrayHydrator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $values = [];
47 47
         $attributes = array_flip($attributes);
48 48
 
49
-        $privatePrefix = "\0" . get_class($object) . "\0";
49
+        $privatePrefix = "\0".get_class($object)."\0";
50 50
         $privatePrefixLen = strlen($privatePrefix);
51 51
 
52 52
         foreach ((array) $object as $name => $property) {
@@ -83,13 +83,13 @@  discard block
 block discarded – undo
83 83
             return $this->hydratorsCache[$entityClass];
84 84
         }
85 85
 
86
-        $hydrator = static function ($object, array $data): void {
86
+        $hydrator = static function($object, array $data): void {
87 87
             foreach ($data as $property => $value) {
88 88
                 try {
89 89
                     if (isset($object->$property) && $object->$property instanceof ImportableInterface && is_array($value)) {
90 90
                         $object->$property->import($value);
91
-                    } elseif (method_exists($object, 'set' . ucfirst($property))) {
92
-                        $object->{'set' . ucfirst($property)}($value);
91
+                    } elseif (method_exists($object, 'set'.ucfirst($property))) {
92
+                        $object->{'set'.ucfirst($property)}($value);
93 93
                     } elseif (property_exists($object, $property)) {
94 94
                         $object->$property = $value;
95 95
                     }
Please login to merge, or discard this patch.
src/Query/Pagination/AbstractPaginator.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     public function pushAll(array $items)
197 197
     {
198 198
         if (!($this->collection instanceof CollectionInterface)) {
199
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
199
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
200 200
         }
201 201
         
202 202
         $this->collection->pushAll($items);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     public function push($item)
211 211
     {
212 212
         if (!($this->collection instanceof CollectionInterface)) {
213
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
213
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
214 214
         }
215 215
         
216 216
         $this->collection->push($item);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     public function put($key, $item)
225 225
     {
226 226
         if (!($this->collection instanceof CollectionInterface)) {
227
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
227
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
228 228
         }
229 229
         
230 230
         $this->collection->put($key, $item);
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
     public function get($key, $default = null)
261 261
     {
262 262
         if (!($this->collection instanceof CollectionInterface)) {
263
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
263
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
264 264
         }
265 265
         
266 266
         return $this->collection->get($key, $default);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     public function has($key): bool
282 282
     {
283 283
         if (!($this->collection instanceof CollectionInterface)) {
284
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
284
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
285 285
         }
286 286
         
287 287
         return $this->collection->has($key);
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
     public function remove($key)
304 304
     {
305 305
         if (!($this->collection instanceof CollectionInterface)) {
306
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
306
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
307 307
         }
308 308
         
309 309
         $this->collection->remove($key);
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
     public function clear()
328 328
     {
329 329
         if (!($this->collection instanceof CollectionInterface)) {
330
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
330
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
331 331
         }
332 332
         
333 333
         $this->collection->clear();
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     public function keys(): array
342 342
     {
343 343
         if (!($this->collection instanceof CollectionInterface)) {
344
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
344
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
345 345
         }
346 346
         
347 347
         return $this->collection->keys();
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
     public function isEmpty(): bool
354 354
     {
355 355
         if (!($this->collection instanceof CollectionInterface)) {
356
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
356
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
357 357
         }
358 358
         
359 359
         return $this->collection->isEmpty();
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
     public function map($callback)
371 371
     {
372 372
         if (!($this->collection instanceof CollectionInterface)) {
373
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
373
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
374 374
         }
375 375
 
376 376
         /** @var static<M> $this */
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
     public function filter($callback = null)
386 386
     {
387 387
         if (!($this->collection instanceof CollectionInterface)) {
388
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
388
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
389 389
         }
390 390
         
391 391
         $this->collection = $this->collection->filter($callback);
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     public function groupBy($groupBy, $mode = PaginatorInterface::GROUPBY)
400 400
     {
401 401
         if (!($this->collection instanceof CollectionInterface)) {
402
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
402
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
403 403
         }
404 404
         
405 405
         $this->collection = $this->collection->groupBy($groupBy, $mode);
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
     public function contains($element): bool
416 416
     {
417 417
         if (!($this->collection instanceof CollectionInterface)) {
418
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
418
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
419 419
         }
420 420
         
421 421
         return $this->collection->contains($element);
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
     public function indexOf($value, $strict = false)
428 428
     {
429 429
         if (!($this->collection instanceof CollectionInterface)) {
430
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
430
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
431 431
         }
432 432
         
433 433
         return $this->collection->indexOf($value, $strict);
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
     public function merge($items)
440 440
     {
441 441
         if (!($this->collection instanceof CollectionInterface)) {
442
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
442
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
443 443
         }
444 444
         
445 445
         $this->collection = $this->collection->merge($items);
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
     public function sort(callable $callback = null)
454 454
     {
455 455
         if (!($this->collection instanceof CollectionInterface)) {
456
-            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method ' . __METHOD__);
456
+            throw new \LogicException('Collection is not an instance of CollectionInterface. Could not call method '.__METHOD__);
457 457
         }
458 458
         
459 459
         $this->collection = $this->collection->sort($callback);
Please login to merge, or discard this patch.
src/Query/Custom/KeyValue/KeyValueQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@
 block discarded – undo
204 204
         $this->statements['offset'] = null;
205 205
         $this->statements['aggregate'] = ['count', $column ?: '*'];
206 206
 
207
-        $count = (int)$this->execute()->current()['aggregate'];
207
+        $count = (int) $this->execute()->current()['aggregate'];
208 208
 
209 209
         $this->compilerState->invalidate();
210 210
         $this->statements = $statements;
Please login to merge, or discard this patch.
src/Query/Extension/CompilableTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
                 return $compiler->compileDelete($this);
102 102
 
103 103
             default:
104
-                throw new \LogicException('The query ' . static::class . ' do not supports type ' . $type);
104
+                throw new \LogicException('The query '.static::class.' do not supports type '.$type);
105 105
         }
106 106
     }
107 107
 }
Please login to merge, or discard this patch.
src/Query/Query.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         $this->statements['offset'] = null;
275 275
         $this->statements['aggregate'] = ['pagination', $this->getPaginationColumns($column)];
276 276
 
277
-        $count = (int)$this->execute()->current()['aggregate'];
277
+        $count = (int) $this->execute()->current()['aggregate'];
278 278
 
279 279
         $this->compilerState->invalidate(['columns', 'orders']);
280 280
         $this->statements = $statements;
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
     #[ReadOperation]
321 321
     public function count(?string $column = null): int
322 322
     {
323
-        return (int)$this->aggregate(__FUNCTION__, $column);
323
+        return (int) $this->aggregate(__FUNCTION__, $column);
324 324
     }
325 325
 
326 326
     /**
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
     #[ReadOperation]
330 330
     public function avg(?string $column = null): float
331 331
     {
332
-        return (float)$this->aggregate(__FUNCTION__, $column);
332
+        return (float) $this->aggregate(__FUNCTION__, $column);
333 333
     }
334 334
 
335 335
     /**
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     #[ReadOperation]
357 357
     public function sum(?string $column = null): float
358 358
     {
359
-        return (float)$this->aggregate(__FUNCTION__, $column);
359
+        return (float) $this->aggregate(__FUNCTION__, $column);
360 360
     }
361 361
 
362 362
     /**
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
         # build a regular expression for each parameter
620 620
         foreach ($values as $key => $value) {
621 621
             if (is_string($key)) {
622
-                $keys[] = '/:' . $key . '/';
622
+                $keys[] = '/:'.$key.'/';
623 623
             } else {
624 624
                 $keys[] = '/[?]/';
625 625
             }
Please login to merge, or discard this patch.
src/Query/Clause.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
                     $this->addCommand($key, $value);
127 127
                 } else {
128 128
                     // Column with operator
129
-                    $key  = explode(' ', trim($key), 2);
129
+                    $key = explode(' ', trim($key), 2);
130 130
                     $parts[] = [
131 131
                         'column'    => $key[0],
132 132
                         'operator'  => isset($key[1]) ? $key[1] : '=',
Please login to merge, or discard this patch.
src/Mapper/Mapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
     public function setGenerator($generator): void
305 305
     {
306 306
         if (!is_string($generator) && !$generator instanceof GeneratorInterface) {
307
-            throw new LogicException('Trying to set an invalid generator in "' . get_class($this) . '"');
307
+            throw new LogicException('Trying to set an invalid generator in "'.get_class($this).'"');
308 308
         }
309 309
         
310 310
         $this->generator = $generator;
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
         $relations = $this->relations();
547 547
         
548 548
         if (!isset($relations[$relationName])) {
549
-            throw new RelationNotFoundException('Relation "' . $relationName . '" is not set in ' . $this->metadata->entityName);
549
+            throw new RelationNotFoundException('Relation "'.$relationName.'" is not set in '.$this->metadata->entityName);
550 550
         }
551 551
         
552 552
         return $relations[$relationName];
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
      */
729 729
     public function scopes(): array
730 730
     {
731
-        throw new LogicException('No scopes have been defined in "' . get_class($this) . '"');
731
+        throw new LogicException('No scopes have been defined in "'.get_class($this).'"');
732 732
     }
733 733
 
734 734
     /**
Please login to merge, or discard this patch.