Completed
Pull Request — master (#5626)
by Gary
09:09
created
lib/Shitty/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/Shitty/ORM/Id/TableGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
                         $this->_tableName, $this->_sequenceName, $this->_allocationSize
93 93
                     );
94 94
 
95
-                    if ($conn->executeUpdate($updateSql, array(1 => $currentLevel, 2 => $currentLevel+1)) !== 1) {
95
+                    if ($conn->executeUpdate($updateSql, array(1 => $currentLevel, 2 => $currentLevel + 1)) !== 1) {
96 96
                         // no affected rows, concurrency issue, throw exception
97 97
                     }
98 98
                 } else {
Please login to merge, or discard this patch.
lib/Shitty/ORM/Id/UuidGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     public function generate(EntityManager $em, $entity)
36 36
     {
37 37
         $conn = $em->getConnection();
38
-        $sql = 'SELECT ' . $conn->getDatabasePlatform()->getGuidExpression();
38
+        $sql = 'SELECT '.$conn->getDatabasePlatform()->getGuidExpression();
39 39
 
40 40
         return $conn->query($sql)->fetchColumn(0);
41 41
     }
Please login to merge, or discard this patch.
lib/Shitty/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/Shitty/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/Shitty/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/Shitty/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/Shitty/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/Shitty/ORM/LazyCriteriaCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
             return $this->collection->isEmpty();
94 94
         }
95 95
 
96
-        return !$this->count();
96
+        return ! $this->count();
97 97
     }
98 98
 
99 99
     /**
Please login to merge, or discard this patch.