Completed
Pull Request — master (#5669)
by Jeremy
48:42 queued 40:04
created
lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
89 89
         $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 't0', $updateClause->aliasIdentificationVariable);
90 90
 
91
-        $this->_insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ')'
92
-                . ' SELECT t0.' . implode(', t0.', $idColumnNames);
91
+        $this->_insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnList.')'
92
+                . ' SELECT t0.'.implode(', t0.', $idColumnNames);
93 93
 
94 94
         $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->name, $updateClause->aliasIdentificationVariable);
95 95
         $fromClause = new AST\FromClause(array(new AST\IdentificationVariableDeclaration($rangeDecl, null, array())));
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->_insertSql .= $sqlWalker->walkFromClause($fromClause);
98 98
 
99 99
         // 2. Create ID subselect statement used in UPDATE ... WHERE ... IN (subselect)
100
-        $idSubselect = 'SELECT ' . $idColumnList . ' FROM ' . $tempTable;
100
+        $idSubselect = 'SELECT '.$idColumnList.' FROM '.$tempTable;
101 101
 
102 102
         // 3. Create and store UPDATE statements
103 103
         $classNames = array_merge($primaryClass->parentClasses, array($primaryClass->name), $primaryClass->subClasses);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         foreach (array_reverse($classNames) as $className) {
107 107
             $affected = false;
108 108
             $class = $em->getClassMetadata($className);
109
-            $updateSql = 'UPDATE ' . $quoteStrategy->getTableName($class, $platform) . ' SET ';
109
+            $updateSql = 'UPDATE '.$quoteStrategy->getTableName($class, $platform).' SET ';
110 110
 
111 111
             foreach ($updateItems as $updateItem) {
112 112
                 $field = $updateItem->pathExpression->field;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             }
134 134
 
135 135
             if ($affected) {
136
-                $this->_sqlStatements[$i] = $updateSql . ' WHERE (' . $idColumnList . ') IN (' . $idSubselect . ')';
136
+                $this->_sqlStatements[$i] = $updateSql.' WHERE ('.$idColumnList.') IN ('.$idSubselect.')';
137 137
             }
138 138
         }
139 139
 
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
             );
153 153
         }
154 154
 
155
-        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
156
-                . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
155
+        $this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' ('
156
+                . $platform->getColumnDeclarationListSQL($columnDefinitions).')';
157 157
 
158 158
         $this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
159 159
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Printer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      */
66 66
     public function startProduction($name)
67 67
     {
68
-        $this->println('(' . $name);
68
+        $this->println('('.$name);
69 69
         $this->_indent++;
70 70
     }
71 71
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     public function countDistinct($x)
270 270
     {
271
-        return 'COUNT(DISTINCT ' . implode(', ', func_get_args()) . ')';
271
+        return 'COUNT(DISTINCT '.implode(', ', func_get_args()).')';
272 272
     }
273 273
 
274 274
     /**
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
             }
451 451
         }
452 452
 
453
-        return new Expr\Func($x . ' IN', (array) $y);
453
+        return new Expr\Func($x.' IN', (array) $y);
454 454
     }
455 455
 
456 456
     /**
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
             }
472 472
         }
473 473
 
474
-        return new Expr\Func($x . ' NOT IN', (array) $y);
474
+        return new Expr\Func($x.' NOT IN', (array) $y);
475 475
     }
476 476
 
477 477
     /**
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
      */
484 484
     public function isNull($x)
485 485
     {
486
-        return $x . ' IS NULL';
486
+        return $x.' IS NULL';
487 487
     }
488 488
 
489 489
     /**
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
      */
496 496
     public function isNotNull($x)
497 497
     {
498
-        return $x . ' IS NOT NULL';
498
+        return $x.' IS NOT NULL';
499 499
     }
500 500
 
501 501
     /**
@@ -613,12 +613,12 @@  discard block
 block discarded – undo
613 613
      */
614 614
     private function _quoteLiteral($literal)
615 615
     {
616
-        if (is_numeric($literal) && !is_string($literal)) {
616
+        if (is_numeric($literal) && ! is_string($literal)) {
617 617
             return (string) $literal;
618 618
         } else if (is_bool($literal)) {
619 619
             return $literal ? "true" : "false";
620 620
         } else {
621
-            return "'" . str_replace("'", "''", $literal) . "'";
621
+            return "'".str_replace("'", "''", $literal)."'";
622 622
         }
623 623
     }
624 624
 
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
      */
634 634
     public function between($val, $x, $y)
635 635
     {
636
-        return $val . ' BETWEEN ' . $x . ' AND ' . $y;
636
+        return $val.' BETWEEN '.$x.' AND '.$y;
637 637
     }
638 638
 
639 639
     /**
Please login to merge, or discard this patch.
Doc Comments   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     /**
76 76
      * Creates an ASCending order expression.
77 77
      *
78
-     * @param mixed $expr
78
+     * @param string $expr
79 79
      *
80 80
      * @return Expr\OrderBy
81 81
      */
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     /**
88 88
      * Creates a DESCending order expression.
89 89
      *
90
-     * @param mixed $expr
90
+     * @param string $expr
91 91
      *
92 92
      * @return Expr\OrderBy
93 93
      */
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
      *     // u.id <> ?1
126 126
      *     $q->where($q->expr()->neq('u.id', '?1'));
127 127
      *
128
-     * @param mixed $x Left expression.
129
-     * @param mixed $y Right expression.
128
+     * @param string $x Left expression.
129
+     * @param string $y Right expression.
130 130
      *
131 131
      * @return Expr\Comparison
132 132
      */
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     /**
215 215
      * Creates an instance of AVG() function, with the given argument.
216 216
      *
217
-     * @param mixed $x Argument to be used in AVG() function.
217
+     * @param string $x Argument to be used in AVG() function.
218 218
      *
219 219
      * @return Expr\Func
220 220
      */
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     /**
227 227
      * Creates an instance of MAX() function, with the given argument.
228 228
      *
229
-     * @param mixed $x Argument to be used in MAX() function.
229
+     * @param string $x Argument to be used in MAX() function.
230 230
      *
231 231
      * @return Expr\Func
232 232
      */
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     /**
239 239
      * Creates an instance of MIN() function, with the given argument.
240 240
      *
241
-     * @param mixed $x Argument to be used in MIN() function.
241
+     * @param string $x Argument to be used in MIN() function.
242 242
      *
243 243
      * @return Expr\Func
244 244
      */
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     /**
251 251
      * Creates an instance of COUNT() function, with the given argument.
252 252
      *
253
-     * @param mixed $x Argument to be used in COUNT() function.
253
+     * @param string $x Argument to be used in COUNT() function.
254 254
      *
255 255
      * @return Expr\Func
256 256
      */
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     /**
263 263
      * Creates an instance of COUNT(DISTINCT) function, with the given argument.
264 264
      *
265
-     * @param mixed $x Argument to be used in COUNT(DISTINCT) function.
265
+     * @param string $x Argument to be used in COUNT(DISTINCT) function.
266 266
      *
267 267
      * @return string
268 268
      */
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
     /**
275 275
      * Creates an instance of EXISTS() function, with the given DQL Subquery.
276 276
      *
277
-     * @param mixed $subquery DQL Subquery to be used in EXISTS() function.
277
+     * @param \Doctrine\ORM\QueryBuilder $subquery DQL Subquery to be used in EXISTS() function.
278 278
      *
279 279
      * @return Expr\Func
280 280
      */
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     /**
299 299
      * Creates a SOME() function expression with the given DQL subquery.
300 300
      *
301
-     * @param mixed $subquery DQL Subquery to be used in SOME() function.
301
+     * @param \Doctrine\ORM\QueryBuilder $subquery DQL Subquery to be used in SOME() function.
302 302
      *
303 303
      * @return Expr\Func
304 304
      */
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     /**
311 311
      * Creates an ANY() function expression with the given DQL subquery.
312 312
      *
313
-     * @param mixed $subquery DQL Subquery to be used in ANY() function.
313
+     * @param \Doctrine\ORM\QueryBuilder $subquery DQL Subquery to be used in ANY() function.
314 314
      *
315 315
      * @return Expr\Func
316 316
      */
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
     /**
335 335
      * Creates an ABS() function expression with the given argument.
336 336
      *
337
-     * @param mixed $x Argument to be used in ABS() function.
337
+     * @param integer $x Argument to be used in ABS() function.
338 338
      *
339 339
      * @return Expr\Func
340 340
      */
@@ -353,8 +353,8 @@  discard block
 block discarded – undo
353 353
      *     // u.salary * u.percentAnnualSalaryIncrease
354 354
      *     $q->expr()->prod('u.salary', 'u.percentAnnualSalaryIncrease')
355 355
      *
356
-     * @param mixed $x Left expression.
357
-     * @param mixed $y Right expression.
356
+     * @param integer $x Left expression.
357
+     * @param integer $y Right expression.
358 358
      *
359 359
      * @return Expr\Math
360 360
      */
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
      *     // u.monthlySubscriptionCount - 1
373 373
      *     $q->expr()->diff('u.monthlySubscriptionCount', '1')
374 374
      *
375
-     * @param mixed $x Left expression.
375
+     * @param integer $x Left expression.
376 376
      * @param mixed $y Right expression.
377 377
      *
378 378
      * @return Expr\Math
@@ -391,8 +391,8 @@  discard block
 block discarded – undo
391 391
      *     // u.numChildren + 1
392 392
      *     $q->expr()->sum('u.numChildren', '1')
393 393
      *
394
-     * @param mixed $x Left expression.
395
-     * @param mixed $y Right expression.
394
+     * @param integer $x Left expression.
395
+     * @param integer $y Right expression.
396 396
      *
397 397
      * @return Expr\Math
398 398
      */
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
      *     $expr->quot('u.total', 'u.period')
412 412
      *
413 413
      * @param mixed $x Left expression.
414
-     * @param mixed $y Right expression.
414
+     * @param integer $y Right expression.
415 415
      *
416 416
      * @return Expr\Math
417 417
      */
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
     /**
424 424
      * Creates a SQRT() function expression with the given argument.
425 425
      *
426
-     * @param mixed $x Argument to be used in SQRT() function.
426
+     * @param integer $x Argument to be used in SQRT() function.
427 427
      *
428 428
      * @return Expr\Func
429 429
      */
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
      * Creates a LIKE() comparison expression with the given arguments.
503 503
      *
504 504
      * @param string $x Field in string format to be inspected by LIKE() comparison.
505
-     * @param mixed  $y Argument to be used in LIKE() comparison.
505
+     * @param string  $y Argument to be used in LIKE() comparison.
506 506
      *
507 507
      * @return Expr\Comparison
508 508
      */
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
      * Creates a NOT LIKE() comparison expression with the given arguments.
516 516
      *
517 517
      * @param string $x Field in string format to be inspected by LIKE() comparison.
518
-     * @param mixed  $y Argument to be used in LIKE() comparison.
518
+     * @param string  $y Argument to be used in LIKE() comparison.
519 519
      *
520 520
      * @return Expr\Comparison
521 521
      */
@@ -527,8 +527,8 @@  discard block
 block discarded – undo
527 527
     /**
528 528
      * Creates a CONCAT() function expression with the given arguments.
529 529
      *
530
-     * @param mixed $x First argument to be used in CONCAT() function.
531
-     * @param mixed $y,... Other arguments to be used in CONCAT() function.
530
+     * @param string $x First argument to be used in CONCAT() function.
531
+     * @param string $y
532 532
      *
533 533
      * @return Expr\Func
534 534
      */
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
     /**
541 541
      * Creates a SUBSTRING() function expression with the given arguments.
542 542
      *
543
-     * @param mixed    $x    Argument to be used as string to be cropped by SUBSTRING() function.
543
+     * @param string    $x    Argument to be used as string to be cropped by SUBSTRING() function.
544 544
      * @param int      $from Initial offset to start cropping string. May accept negative values.
545 545
      * @param int|null $len  Length of crop. May accept negative values.
546 546
      *
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
     /**
560 560
      * Creates a LOWER() function expression with the given argument.
561 561
      *
562
-     * @param mixed $x Argument to be used in LOWER() function.
562
+     * @param string $x Argument to be used in LOWER() function.
563 563
      *
564 564
      * @return Expr\Func A LOWER function expression.
565 565
      */
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
     /**
572 572
      * Creates an UPPER() function expression with the given argument.
573 573
      *
574
-     * @param mixed $x Argument to be used in UPPER() function.
574
+     * @param string $x Argument to be used in UPPER() function.
575 575
      *
576 576
      * @return Expr\Func An UPPER function expression.
577 577
      */
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
     /**
584 584
      * Creates a LENGTH() function expression with the given argument.
585 585
      *
586
-     * @param mixed $x Argument to be used as argument of LENGTH() function.
586
+     * @param string $x Argument to be used as argument of LENGTH() function.
587 587
      *
588 588
      * @return Expr\Func A LENGTH function expression.
589 589
      */
@@ -625,11 +625,11 @@  discard block
 block discarded – undo
625 625
     /**
626 626
      * Creates an instance of BETWEEN() function, with the given argument.
627 627
      *
628
-     * @param mixed   $val Valued to be inspected by range values.
628
+     * @param string   $val Valued to be inspected by range values.
629 629
      * @param integer $x   Starting range value to be used in BETWEEN() function.
630 630
      * @param integer $y   End point value to be used in BETWEEN() function.
631 631
      *
632
-     * @return Expr\Func A BETWEEN expression.
632
+     * @return string A BETWEEN expression.
633 633
      */
634 634
     public function between($val, $x, $y)
635 635
     {
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
     /**
640 640
      * Creates an instance of TRIM() function, with the given argument.
641 641
      *
642
-     * @param mixed $x Argument to be used as argument of TRIM() function.
642
+     * @param string $x Argument to be used as argument of TRIM() function.
643 643
      *
644 644
      * @return Expr\Func a TRIM expression.
645 645
      */
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/QueryExpressionVisitor.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $expressionList[] = $this->dispatch($child);
115 115
         }
116 116
 
117
-        switch($expr->getType()) {
117
+        switch ($expr->getType()) {
118 118
             case CompositeExpression::TYPE_AND:
119 119
                 return new Expr\Andx($expressionList);
120 120
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 return new Expr\Orx($expressionList);
123 123
 
124 124
             default:
125
-                throw new \RuntimeException("Unknown composite " . $expr->getType());
125
+                throw new \RuntimeException("Unknown composite ".$expr->getType());
126 126
         }
127 127
     }
128 128
 
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
             throw new QueryException('No aliases are set before invoking walkComparison().');
137 137
         }
138 138
 
139
-        $field = $this->queryAliases[0] . '.' . $comparison->getField();
139
+        $field = $this->queryAliases[0].'.'.$comparison->getField();
140 140
 
141
-        foreach($this->queryAliases as $alias) {
142
-            if(strpos($comparison->getField() . '.', $alias . '.') === 0) {
141
+        foreach ($this->queryAliases as $alias) {
142
+            if (strpos($comparison->getField().'.', $alias.'.') === 0) {
143 143
                 $field = $comparison->getField();
144 144
                 break;
145 145
             }
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
 
150 150
         foreach ($this->parameters as $parameter) {
151 151
             if ($parameter->getName() === $parameterName) {
152
-                $parameterName .= '_' . count($this->parameters);
152
+                $parameterName .= '_'.count($this->parameters);
153 153
                 break;
154 154
             }
155 155
         }
156 156
 
157 157
         $parameter = new Parameter($parameterName, $this->walkValue($comparison->getValue()));
158
-        $placeholder = ':' . $parameterName;
158
+        $placeholder = ':'.$parameterName;
159 159
 
160 160
         switch ($comparison->getOperator()) {
161 161
             case Comparison::IN:
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
                 
183 183
                 return $this->expr->neq($field, $placeholder);
184 184
             case Comparison::CONTAINS:
185
-                $parameter->setValue('%' . $parameter->getValue() . '%', $parameter->getType());
185
+                $parameter->setValue('%'.$parameter->getValue().'%', $parameter->getType());
186 186
                 $this->parameters[] = $parameter;
187 187
                 
188 188
                 return $this->expr->like($field, $placeholder);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     );
199 199
                 }
200 200
 
201
-                throw new \RuntimeException("Unknown comparison operator: " . $comparison->getOperator());
201
+                throw new \RuntimeException("Unknown comparison operator: ".$comparison->getOperator());
202 202
         }
203 203
     }
204 204
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
21 21
 
22 22
 use Doctrine\Common\Collections\ArrayCollection;
23 23
 use Doctrine\Common\Collections\Criteria;
24
-
25 24
 use Doctrine\ORM\Query\Expr;
26 25
 use Doctrine\ORM\Query\QueryExpressionVisitor;
27 26
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Filter/SQLFilter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
      */
101 101
     final public function getParameter($name)
102 102
     {
103
-        if (!isset($this->parameters[$name])) {
104
-            throw new \InvalidArgumentException("Parameter '" . $name . "' does not exist.");
103
+        if ( ! isset($this->parameters[$name])) {
104
+            throw new \InvalidArgumentException("Parameter '".$name."' does not exist.");
105 105
         }
106 106
 
107 107
         return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     final public function hasParameter($name)
118 118
     {
119
-        if (!isset($this->parameters[$name])) {
119
+        if ( ! isset($this->parameters[$name])) {
120 120
             return false;
121 121
         }
122 122
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     public function getRepository(EntityManagerInterface $entityManager, $entityName)
43 43
     {
44
-        $repositoryHash = $entityManager->getClassMetadata($entityName)->getName() . spl_object_hash($entityManager);
44
+        $repositoryHash = $entityManager->getClassMetadata($entityName)->getName().spl_object_hash($entityManager);
45 45
 
46 46
         if (isset($this->repositoryList[$repositoryHash])) {
47 47
             return $this->repositoryList[$repositoryHash];
Please login to merge, or discard this patch.
lib/Doctrine/ORM/ORMInvalidArgumentException.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     static public function scheduleInsertForManagedEntity($entity)
36 36
     {
37
-        return new self("A managed+dirty entity " . self::objToStr($entity) . " can not be scheduled for insertion.");
37
+        return new self("A managed+dirty entity ".self::objToStr($entity)." can not be scheduled for insertion.");
38 38
     }
39 39
 
40 40
     /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     static public function scheduleInsertForRemovedEntity($entity)
46 46
     {
47
-        return new self("Removed entity " . self::objToStr($entity) . " can not be scheduled for insertion.");
47
+        return new self("Removed entity ".self::objToStr($entity)." can not be scheduled for insertion.");
48 48
     }
49 49
 
50 50
     /**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     static public function scheduleInsertTwice($entity)
56 56
     {
57
-        return new self("Entity " . self::objToStr($entity) . " can not be scheduled for insertion twice.");
57
+        return new self("Entity ".self::objToStr($entity)." can not be scheduled for insertion twice.");
58 58
     }
59 59
 
60 60
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     static public function entityWithoutIdentity($className, $entity)
67 67
     {
68 68
         return new self(
69
-            "The given entity of type '" . $className . "' (".self::objToStr($entity).") has no identity/no " .
69
+            "The given entity of type '".$className."' (".self::objToStr($entity).") has no identity/no ".
70 70
             "id values set. It cannot be added to the identity map."
71 71
         );
72 72
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     static public function readOnlyRequiresManagedEntity($entity)
80 80
     {
81
-        return new self("Only managed entities can be marked or checked as read only. But " . self::objToStr($entity) . " is not");
81
+        return new self("Only managed entities can be marked or checked as read only. But ".self::objToStr($entity)." is not");
82 82
     }
83 83
 
84 84
     /**
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
     static public function newEntityFoundThroughRelationship(array $assoc, $entry)
91 91
     {
92 92
         return new self("A new entity was found through the relationship '"
93
-            . $assoc['sourceEntity'] . "#" . $assoc['fieldName'] . "' that was not"
94
-            . " configured to cascade persist operations for entity: " . self::objToStr($entry) . "."
93
+            . $assoc['sourceEntity']."#".$assoc['fieldName']."' that was not"
94
+            . " configured to cascade persist operations for entity: ".self::objToStr($entry)."."
95 95
             . " To solve this issue: Either explicitly call EntityManager#persist()"
96 96
             . " on this unknown entity or configure cascade persist "
97 97
             . " this association in the mapping for example @ManyToOne(..,cascade={\"persist\"})."
98
-            . (method_exists($entry, '__toString') ? "": " If you cannot find out which entity causes the problem"
99
-            . " implement '" . $assoc['targetEntity'] . "#__toString()' to get a clue."));
98
+            . (method_exists($entry, '__toString') ? "" : " If you cannot find out which entity causes the problem"
99
+            . " implement '".$assoc['targetEntity']."#__toString()' to get a clue."));
100 100
     }
101 101
 
102 102
     /**
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
      */
108 108
     static public function detachedEntityFoundThroughRelationship(array $assoc, $entry)
109 109
     {
110
-        return new self("A detached entity of type " . $assoc['targetEntity'] . " (" . self::objToStr($entry) . ") "
111
-            . " was found through the relationship '" . $assoc['sourceEntity'] . "#" . $assoc['fieldName'] . "' "
110
+        return new self("A detached entity of type ".$assoc['targetEntity']." (".self::objToStr($entry).") "
111
+            . " was found through the relationship '".$assoc['sourceEntity']."#".$assoc['fieldName']."' "
112 112
             . "during cascading a persist operation.");
113 113
     }
114 114
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     static public function entityNotManaged($entity)
121 121
     {
122
-        return new self("Entity " . self::objToStr($entity) . " is not managed. An entity is managed if its fetched " .
122
+        return new self("Entity ".self::objToStr($entity)." is not managed. An entity is managed if its fetched ".
123 123
             "from the database or registered as new through EntityManager#persist");
124 124
     }
125 125
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     static public function entityHasNoIdentity($entity, $operation)
133 133
     {
134
-        return new self("Entity has no identity, therefore " . $operation ." cannot be performed. " . self::objToStr($entity));
134
+        return new self("Entity has no identity, therefore ".$operation." cannot be performed. ".self::objToStr($entity));
135 135
     }
136 136
 
137 137
     /**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     static public function entityIsRemoved($entity, $operation)
144 144
     {
145
-        return new self("Entity is removed, therefore " . $operation ." cannot be performed. " . self::objToStr($entity));
145
+        return new self("Entity is removed, therefore ".$operation." cannot be performed. ".self::objToStr($entity));
146 146
     }
147 147
 
148 148
     /**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      */
154 154
     static public function detachedEntityCannot($entity, $operation)
155 155
     {
156
-        return new self("Detached entity " . self::objToStr($entity) . " cannot be " . $operation);
156
+        return new self("Detached entity ".self::objToStr($entity)." cannot be ".$operation);
157 157
     }
158 158
 
159 159
     /**
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
      */
166 166
     public static function invalidObject($context, $given, $parameterIndex = 1)
167 167
     {
168
-        return new self($context . ' expects parameter ' . $parameterIndex .
169
-            ' to be an entity object, '. gettype($given) . ' given.');
168
+        return new self($context.' expects parameter '.$parameterIndex.
169
+            ' to be an entity object, '.gettype($given).' given.');
170 170
     }
171 171
 
172 172
     /**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public static function invalidCompositeIdentifier()
176 176
     {
177
-        return new self("Binding an entity with a composite primary key to a query is not supported. " .
177
+        return new self("Binding an entity with a composite primary key to a query is not supported. ".
178 178
             "You should split the parameter into the explicit fields and bind them separately.");
179 179
     }
180 180
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityNotFoundException.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
         $ids = array();
41 41
 
42 42
         foreach ($id as $key => $value) {
43
-            $ids[] = $key . '(' . $value . ')';
43
+            $ids[] = $key.'('.$value.')';
44 44
         }
45 45
 
46 46
 
47 47
         return new self(
48
-            'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found'
48
+            'Entity of type \''.$className.'\''.($ids ? ' for IDs '.implode(', ', $ids) : '').' was not found'
49 49
         );
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/OptimisticLockException.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $expectedLockVersion = ($expectedLockVersion instanceof \DateTime) ? $expectedLockVersion->getTimestamp() : $expectedLockVersion;
77 77
         $actualLockVersion = ($actualLockVersion instanceof \DateTime) ? $actualLockVersion->getTimestamp() : $actualLockVersion;
78 78
 
79
-        return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion, $entity);
79
+        return new self("The optimistic lock failed, version ".$expectedLockVersion." was expected, but is actually ".$actualLockVersion, $entity);
80 80
     }
81 81
 
82 82
     /**
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public static function notVersioned($entityName)
88 88
     {
89
-        return new self("Cannot obtain optimistic lock on unversioned entity " . $entityName, null);
89
+        return new self("Cannot obtain optimistic lock on unversioned entity ".$entityName, null);
90 90
     }
91 91
 }
Please login to merge, or discard this patch.