Failed Conditions
Pull Request — master (#6705)
by Michael
14:32
created
tests/Doctrine/Tests/ORM/Query/QueryTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             9 => "St Julien"
166 166
         ];
167 167
 
168
-        $query  = $this->_em
168
+        $query = $this->_em
169 169
                 ->createQuery("SELECT a FROM Doctrine\Tests\Models\CMS\CmsAddress a WHERE a.city IN (:cities)")
170 170
                 ->setParameter('cities', $cities);
171 171
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      */
182 182
     public function testProcessParameterValueClassMetadata()
183 183
     {
184
-        $query  = $this->_em->createQuery("SELECT a FROM Doctrine\Tests\Models\CMS\CmsAddress a WHERE a.city IN (:cities)");
184
+        $query = $this->_em->createQuery("SELECT a FROM Doctrine\Tests\Models\CMS\CmsAddress a WHERE a.city IN (:cities)");
185 185
         $this->assertEquals(
186 186
             CmsAddress::class,
187 187
             $query->processParameterValue($this->_em->getClassMetadata(CmsAddress::class))
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
      */
311 311
     public function testGetParameterTypeJuggling() : void
312 312
     {
313
-        $query = $this->_em->createQuery('select u from ' . CmsUser::class . ' u where u.id = ?0');
313
+        $query = $this->_em->createQuery('select u from '.CmsUser::class.' u where u.id = ?0');
314 314
 
315 315
         $query->setParameter(0, 0);
316 316
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
      */
324 324
     public function testSetParameterWithNameZeroIsNotOverridden() : void
325 325
     {
326
-        $query = $this->_em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name');
326
+        $query = $this->_em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name');
327 327
 
328 328
         $query->setParameter(0, 0);
329 329
         $query->setParameter('name', 'Doctrine');
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
      */
339 339
     public function testSetParameterWithNameZeroDoesNotOverrideAnotherParameter() : void
340 340
     {
341
-        $query = $this->_em->createQuery('select u from ' . CmsUser::class . ' u where u.id != ?0 and u.username = :name');
341
+        $query = $this->_em->createQuery('select u from '.CmsUser::class.' u where u.id != ?0 and u.username = :name');
342 342
 
343 343
         $query->setParameter('name', 'Doctrine');
344 344
         $query->setParameter(0, 0);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/AbstractQuery.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     public function getParameter($key)
322 322
     {
323 323
         $filteredParameters = $this->parameters->filter(
324
-            function ($parameter) use ($key)
324
+            function($parameter) use ($key)
325 325
             {
326 326
                 $parameterName = $parameter->getName();
327 327
                 return $key === $parameterName || (string) $key === (string) $parameterName;
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
      */
460 460
     private function translateNamespaces(Query\ResultSetMapping $rsm)
461 461
     {
462
-        $translate = function ($alias) {
462
+        $translate = function($alias) {
463 463
             return $this->_em->getClassMetadata($alias)->getName();
464 464
         };
465 465
 
@@ -989,7 +989,7 @@  discard block
 block discarded – undo
989 989
             $this->getTimestampKey()
990 990
         );
991 991
 
992
-        $result     = $queryCache->get($queryKey, $rsm, $this->_hints);
992
+        $result = $queryCache->get($queryKey, $rsm, $this->_hints);
993 993
 
994 994
         if ($result !== null) {
995 995
             if ($this->cacheLogger) {
@@ -1125,6 +1125,6 @@  discard block
 block discarded – undo
1125 1125
 
1126 1126
         ksort($hints);
1127 1127
 
1128
-        return sha1($query . '-' . serialize($params) . '-' . serialize($hints));
1128
+        return sha1($query.'-'.serialize($params).'-'.serialize($hints));
1129 1129
     }
1130 1130
 }
Please login to merge, or discard this patch.