Completed
Branch develop (d0d4c6)
by Marco
16:40
created
lib/Doctrine/ORM/EntityManagerInterface.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -242,17 +242,17 @@
 block discarded – undo
242 242
     public function getUnitOfWork();
243 243
 
244 244
     /**
245
-    * Gets a hydrator for the given hydration mode.
246
-    *
247
-    * This method caches the hydrator instances which is used for all queries that don't
248
-    * selectively iterate over the result.
249
-    *
250
-    * @deprecated
251
-    *
252
-    * @param int $hydrationMode
253
-    *
254
-    * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator
255
-    */
245
+     * Gets a hydrator for the given hydration mode.
246
+     *
247
+     * This method caches the hydrator instances which is used for all queries that don't
248
+     * selectively iterate over the result.
249
+     *
250
+     * @deprecated
251
+     *
252
+     * @param int $hydrationMode
253
+     *
254
+     * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator
255
+     */
256 256
     public function getHydrator($hydrationMode);
257 257
 
258 258
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
                 // It's a joined result
109 109
 
110 110
                 $parent = $this->_rsm->parentAliasMap[$dqlAlias];
111
-                $path   = $parent . '.' . $dqlAlias;
111
+                $path   = $parent.'.'.$dqlAlias;
112 112
 
113 113
                 // missing parent data, skipping as RIGHT JOIN hydration is not supported.
114
-                if ( ! isset($nonemptyComponents[$parent]) ) {
114
+                if ( ! isset($nonemptyComponents[$parent])) {
115 115
                     continue;
116 116
                 }
117 117
 
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
                 if ($this->_rsm->isMixed && isset($this->_rootAliases[$parent])) {
121 121
                     $first = reset($this->_resultPointers);
122 122
                     // TODO: Exception if $key === null ?
123
-                    $baseElement =& $this->_resultPointers[$parent][key($first)];
123
+                    $baseElement = & $this->_resultPointers[$parent][key($first)];
124 124
                 } else if (isset($this->_resultPointers[$parent])) {
125
-                    $baseElement =& $this->_resultPointers[$parent];
125
+                    $baseElement = & $this->_resultPointers[$parent];
126 126
                 } else {
127 127
                     unset($this->_resultPointers[$dqlAlias]); // Ticket #1228
128 128
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                     }
174 174
                 }
175 175
 
176
-                $coll =& $baseElement[$relationAlias];
176
+                $coll = & $baseElement[$relationAlias];
177 177
 
178 178
                 if (is_array($coll)) {
179 179
                     $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne);
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
                 $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0;
186 186
 
187 187
                 // if this row has a NULL value for the root result id then make it a null result.
188
-                if ( ! isset($nonemptyComponents[$dqlAlias]) ) {
188
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
189 189
                     $result[] = $this->_rsm->isMixed
190 190
                         ? array($entityKey => null)
191 191
                         : null;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                 $resultKey = $this->_resultCounter - 1;
247 247
             }
248 248
 
249
-            $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0);
249
+            $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0);
250 250
 
251 251
             foreach ($rowData['newObjects'] as $objIndex => $newObject) {
252 252
                 $class  = $newObject['class'];
@@ -284,13 +284,13 @@  discard block
 block discarded – undo
284 284
         }
285 285
 
286 286
         if ($oneToOne) {
287
-            $this->_resultPointers[$dqlAlias] =& $coll;
287
+            $this->_resultPointers[$dqlAlias] = & $coll;
288 288
 
289 289
             return;
290 290
         }
291 291
 
292 292
         if ($index !== false) {
293
-            $this->_resultPointers[$dqlAlias] =& $coll[$index];
293
+            $this->_resultPointers[$dqlAlias] = & $coll[$index];
294 294
 
295 295
             return;
296 296
         }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         }
301 301
 
302 302
         end($coll);
303
-        $this->_resultPointers[$dqlAlias] =& $coll[key($coll)];
303
+        $this->_resultPointers[$dqlAlias] = & $coll[key($coll)];
304 304
 
305 305
         return;
306 306
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/HydrationException.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@
 block discarded – undo
48 48
      */
49 49
     public static function emptyDiscriminatorValue($dqlAlias)
50 50
     {
51
-        return new self("The DQL alias '" . $dqlAlias . "' contains an entity ".
52
-            "of an inheritance hierarchy with an empty discriminator value. This means " .
53
-            "that the database contains inconsistent data with an empty " .
51
+        return new self("The DQL alias '".$dqlAlias."' contains an entity ".
52
+            "of an inheritance hierarchy with an empty discriminator value. This means ".
53
+            "that the database contains inconsistent data with an empty ".
54 54
             "discriminator value in a table row."
55 55
         );
56 56
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             $class->reflFields[$fieldName]->setValue($entity, $value);
203 203
             $this->_uow->setOriginalEntityProperty($oid, $fieldName, $value);
204 204
 
205
-            $this->initializedCollections[$oid . $fieldName] = $value;
205
+            $this->initializedCollections[$oid.$fieldName] = $value;
206 206
         } else if (
207 207
             isset($this->_hints[Query::HINT_REFRESH]) ||
208 208
             isset($this->_hints['fetched'][$parentDqlAlias][$fieldName]) &&
@@ -213,10 +213,10 @@  discard block
 block discarded – undo
213 213
             $value->setInitialized(true);
214 214
             $value->unwrap()->clear();
215 215
 
216
-            $this->initializedCollections[$oid . $fieldName] = $value;
216
+            $this->initializedCollections[$oid.$fieldName] = $value;
217 217
         } else {
218 218
             // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN!
219
-            $this->existingCollections[$oid . $fieldName] = $value;
219
+            $this->existingCollections[$oid.$fieldName] = $value;
220 220
         }
221 221
 
222 222
         return $value;
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
             $idHash = '';
290 290
 
291 291
             foreach ($class->identifier as $fieldName) {
292
-                $idHash .= ' ' . (isset($class->associationMappings[$fieldName])
292
+                $idHash .= ' '.(isset($class->associationMappings[$fieldName])
293 293
                     ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']]
294 294
                     : $data[$fieldName]);
295 295
             }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
                 $parentAlias = $this->_rsm->parentAliasMap[$dqlAlias];
343 343
                 // we need the $path to save into the identifier map which entities were already
344 344
                 // seen for this parent-child relationship
345
-                $path = $parentAlias . '.' . $dqlAlias;
345
+                $path = $parentAlias.'.'.$dqlAlias;
346 346
 
347 347
                 // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs
348 348
                 if ( ! isset($nonemptyComponents[$parentAlias])) {
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
                     $reflFieldValue = $reflField->getValue($parentObject);
383 383
 
384 384
                     if (isset($nonemptyComponents[$dqlAlias])) {
385
-                        $collKey = $oid . $relationField;
385
+                        $collKey = $oid.$relationField;
386 386
                         if (isset($this->initializedCollections[$collKey])) {
387 387
                             $reflFieldValue = $this->initializedCollections[$collKey];
388 388
                         } else if ( ! isset($this->existingCollections[$collKey])) {
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
                     // PATH B: Single-valued association
431 431
                     $reflFieldValue = $reflField->getValue($parentObject);
432 432
 
433
-                    if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && !$reflFieldValue->__isInitialized__)) {
433
+                    if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && ! $reflFieldValue->__isInitialized__)) {
434 434
                         // we only need to take action if this value is null,
435 435
                         // we refresh the entity or its an unitialized proxy.
436 436
                         if (isset($nonemptyComponents[$dqlAlias])) {
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
                 $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0;
476 476
 
477 477
                 // if this row has a NULL value for the root result id then make it a null result.
478
-                if ( ! isset($nonemptyComponents[$dqlAlias]) ) {
478
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
479 479
                     if ($this->_rsm->isMixed) {
480 480
                         $result[] = array($entityKey => null);
481 481
                     } else {
@@ -531,13 +531,13 @@  discard block
 block discarded – undo
531 531
             }
532 532
         }
533 533
 
534
-        if ( ! isset($resultKey) ) {
534
+        if ( ! isset($resultKey)) {
535 535
             $this->resultCounter++;
536 536
         }
537 537
 
538 538
         // Append scalar values to mixed result sets
539 539
         if (isset($rowData['scalars'])) {
540
-            if ( ! isset($resultKey) ) {
540
+            if ( ! isset($resultKey)) {
541 541
                 $resultKey = (isset($this->_rsm->indexByMap['scalars']))
542 542
                     ? $row[$this->_rsm->indexByMap['scalars']]
543 543
                     : $this->resultCounter - 1;
@@ -550,19 +550,19 @@  discard block
 block discarded – undo
550 550
 
551 551
         // Append new object to mixed result sets
552 552
         if (isset($rowData['newObjects'])) {
553
-            if ( ! isset($resultKey) ) {
553
+            if ( ! isset($resultKey)) {
554 554
                 $resultKey = $this->resultCounter - 1;
555 555
             }
556 556
 
557 557
 
558
-            $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0);
558
+            $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0);
559 559
 
560 560
             foreach ($rowData['newObjects'] as $objIndex => $newObject) {
561 561
                 $class  = $newObject['class'];
562 562
                 $args   = $newObject['args'];
563 563
                 $obj    = $class->newInstanceArgs($args);
564 564
 
565
-                if ($scalarCount == 0 && count($rowData['newObjects']) == 1 ) {
565
+                if ($scalarCount == 0 && count($rowData['newObjects']) == 1) {
566 566
                     $result[$resultKey] = $obj;
567 567
 
568 568
                     continue;
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 PDO;
23 23
 use Doctrine\Common\Collections\ArrayCollection;
24
-use Doctrine\ORM\Event\PostLoadEventDispatcher;
25 24
 use Doctrine\ORM\Mapping\ClassMetadata;
26 25
 use Doctrine\ORM\PersistentCollection;
27 26
 use Doctrine\ORM\Proxy\Proxy;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                         : $value;
300 300
 
301 301
                     if ($cacheKeyInfo['isIdentifier'] && $value !== null) {
302
-                        $id[$dqlAlias] .= '|' . $value;
302
+                        $id[$dqlAlias] .= '|'.$value;
303 303
                         $nonemptyComponents[$dqlAlias] = true;
304 304
                     }
305 305
                     break;
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
             if ( ! isset($cacheKeyInfo['isScalar'])) {
338 338
                 $dqlAlias  = $cacheKeyInfo['dqlAlias'];
339 339
                 $type      = $cacheKeyInfo['type'];
340
-                $fieldName = $dqlAlias . '_' . $fieldName;
340
+                $fieldName = $dqlAlias.'_'.$fieldName;
341 341
                 $value     = $type
342 342
                     ? $type->convertToPHPValue($value, $this->_platform)
343 343
                     : $value;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/IterableResult.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,6 +105,6 @@
 block discarded – undo
105 105
      */
106 106
     public function valid()
107 107
     {
108
-        return ($this->_current!=false);
108
+        return ($this->_current != false);
109 109
     }
110 110
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -715,9 +715,9 @@
 block discarded – undo
715 715
         );
716 716
     }
717 717
 
718
-     /**
719
-     * {@inheritdoc}
720
-     */
718
+        /**
719
+         * {@inheritdoc}
720
+         */
721 721
     protected function getHash()
722 722
     {
723 723
         return sha1(parent::getHash(). '-'. $this->_firstResult . '-' . $this->_maxResults);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * A query object is in CLEAN state when it has NO unparsed/unprocessed DQL parts.
42 42
      */
43
-    const STATE_CLEAN  = 1;
43
+    const STATE_CLEAN = 1;
44 44
 
45 45
     /**
46 46
      * A query object is in state DIRTY when it has DQL parts that have not yet been
@@ -707,11 +707,11 @@  discard block
 block discarded – undo
707 707
             ->getName();
708 708
 
709 709
         return md5(
710
-            $this->getDql() . serialize($this->_hints) .
711
-            '&platform=' . $platform .
712
-            ($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : '') .
713
-            '&firstResult=' . $this->_firstResult . '&maxResult=' . $this->_maxResults .
714
-            '&hydrationMode=' . $this->_hydrationMode . '&types=' . serialize($this->_parsedTypes) . 'DOCTRINE_QUERY_CACHE_SALT'
710
+            $this->getDql().serialize($this->_hints).
711
+            '&platform='.$platform.
712
+            ($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : '').
713
+            '&firstResult='.$this->_firstResult.'&maxResult='.$this->_maxResults.
714
+            '&hydrationMode='.$this->_hydrationMode.'&types='.serialize($this->_parsedTypes).'DOCTRINE_QUERY_CACHE_SALT'
715 715
         );
716 716
     }
717 717
 
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
      */
721 721
     protected function getHash()
722 722
     {
723
-        return sha1(parent::getHash(). '-'. $this->_firstResult . '-' . $this->_maxResults);
723
+        return sha1(parent::getHash().'-'.$this->_firstResult.'-'.$this->_maxResults);
724 724
     }
725 725
 
726 726
     /**
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -620,7 +620,7 @@
 block discarded – undo
620 620
      * Executes the query and returns an IterableResult that can be used to incrementally
621 621
      * iterated over the result.
622 622
      *
623
-     * @param ArrayCollection|array|null $parameters    The query parameters.
623
+     * @param null|ArrayCollection $parameters    The query parameters.
624 624
      * @param integer                    $hydrationMode The hydration mode to use.
625 625
      *
626 626
      * @return \Doctrine\ORM\Internal\Hydration\IterableResult
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function referenceColumnName()
102 102
     {
103
-        return $this->case === CASE_UPPER ?  'ID' : 'id';
103
+        return $this->case === CASE_UPPER ? 'ID' : 'id';
104 104
     }
105 105
 
106 106
     /**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function joinColumnName($propertyName, $className = null)
110 110
     {
111
-        return $this->underscore($propertyName) . '_' . $this->referenceColumnName();
111
+        return $this->underscore($propertyName).'_'.$this->referenceColumnName();
112 112
     }
113 113
 
114 114
     /**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function joinTableName($sourceEntity, $targetEntity, $propertyName = null)
118 118
     {
119
-        return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity);
119
+        return $this->classToTableName($sourceEntity).'_'.$this->classToTableName($targetEntity);
120 120
     }
121 121
     
122 122
     /**
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function joinKeyColumnName($entityName, $referencedColumnName = null)
126 126
     {
127
-        return $this->classToTableName($entityName) . '_' .
127
+        return $this->classToTableName($entityName).'_'.
128 128
                 ($referencedColumnName ?: $this->referenceColumnName());
129 129
     }
130 130
     
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -707,13 +707,13 @@
 block discarded – undo
707 707
         return $joinColumn;
708 708
     }
709 709
 
710
-     /**
711
-     * Parses the given field as array.
712
-     *
713
-     * @param SimpleXMLElement $fieldMapping
714
-     *
715
-     * @return array
716
-     */
710
+        /**
711
+         * Parses the given field as array.
712
+         *
713
+         * @param SimpleXMLElement $fieldMapping
714
+         *
715
+         * @return array
716
+         */
717 717
     private function columnToArray(SimpleXMLElement $fieldMapping)
718 718
     {
719 719
         $mapping = array(
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
         if (isset($xmlRoot['inheritance-type'])) {
162 162
             $inheritanceType = (string) $xmlRoot['inheritance-type'];
163
-            $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType));
163
+            $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.$inheritanceType));
164 164
 
165 165
             if ($metadata->inheritanceType != \Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_NONE) {
166 166
                 $discrColumn = new DiscriminatorColumnMetadata();
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         // Evaluate <change-tracking-policy...>
201 201
         if (isset($xmlRoot['change-tracking-policy'])) {
202 202
             $metadata->setChangeTrackingPolicy(
203
-                constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_' . strtoupper((string) $xmlRoot['change-tracking-policy']))
203
+                constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_'.strtoupper((string) $xmlRoot['change-tracking-policy']))
204 204
             );
205 205
         }
206 206
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
                     : 'AUTO';
312 312
 
313 313
                 $metadata->setIdGeneratorType(
314
-                    constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $strategy)
314
+                    constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_'.$strategy)
315 315
                 );
316 316
             }
317 317
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
                 }
349 349
 
350 350
                 if (isset($oneToOneElement['fetch'])) {
351
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToOneElement['fetch']);
351
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToOneElement['fetch']);
352 352
                 }
353 353
 
354 354
                 if (isset($oneToOneElement['mapped-by'])) {
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
                 );
399 399
 
400 400
                 if (isset($oneToManyElement['fetch'])) {
401
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $oneToManyElement['fetch']);
401
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToManyElement['fetch']);
402 402
                 }
403 403
 
404 404
                 if (isset($oneToManyElement->cascade)) {
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
                 }
446 446
 
447 447
                 if (isset($manyToOneElement['fetch'])) {
448
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToOneElement['fetch']);
448
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToOneElement['fetch']);
449 449
                 }
450 450
 
451 451
                 if (isset($manyToOneElement['inversed-by'])) {
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
                 );
488 488
 
489 489
                 if (isset($manyToManyElement['fetch'])) {
490
-                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $manyToManyElement['fetch']);
490
+                    $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToManyElement['fetch']);
491 491
                 }
492 492
 
493 493
                 if (isset($manyToManyElement['orphan-removal'])) {
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
         // Evaluate <lifecycle-callbacks...>
618 618
         if (isset($xmlRoot->{'lifecycle-callbacks'})) {
619 619
             foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) {
620
-                $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::' . (string) $lifecycleCallback['type']));
620
+                $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::'.(string) $lifecycleCallback['type']));
621 621
             }
622 622
         }
623 623
 
@@ -782,12 +782,12 @@  discard block
 block discarded – undo
782 782
         $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null;
783 783
         $usage  = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null;
784 784
 
785
-        if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) {
785
+        if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage)) {
786 786
             throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage));
787 787
         }
788 788
 
789 789
         if ($usage) {
790
-            $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage);
790
+            $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage);
791 791
         }
792 792
 
793 793
         return array(
Please login to merge, or discard this patch.