Completed
Pull Request — master (#6735)
by Matthias
12:21
created
lib/Doctrine/ORM/Query.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
         // Check query cache.
258 258
         $queryCache = $this->getQueryCacheDriver();
259
-        if (! ($this->useQueryCache && $queryCache)) {
259
+        if ( ! ($this->useQueryCache && $queryCache)) {
260 260
             $parser = new Parser($this);
261 261
 
262 262
             $this->parserResult = $parser->parse();
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             $rsm   = $this->getResultSetMapping();
395 395
             $type  = null;
396 396
 
397
-            if (! isset($paramMappings[$key])) {
397
+            if ( ! isset($paramMappings[$key])) {
398 398
                 throw QueryException::unknownParameter($key);
399 399
             }
400 400
 
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
     public function setLockMode($lockMode)
710 710
     {
711 711
         if (in_array($lockMode, [LockMode::NONE, LockMode::PESSIMISTIC_READ, LockMode::PESSIMISTIC_WRITE], true)) {
712
-            if (! $this->em->getConnection()->isTransactionActive()) {
712
+            if ( ! $this->em->getConnection()->isTransactionActive()) {
713 713
                 throw TransactionRequiredException::transactionRequired();
714 714
             }
715 715
         }
@@ -750,11 +750,11 @@  discard block
 block discarded – undo
750 750
             ->getName();
751 751
 
752 752
         return md5(
753
-            $this->getDQL() . serialize($this->hints) .
754
-            '&platform=' . $platform .
755
-            ($this->em->hasFilters() ? $this->em->getFilters()->getHash() : '') .
756
-            '&firstResult=' . $this->firstResult . '&maxResult=' . $this->maxResults .
757
-            '&hydrationMode=' . $this->hydrationMode . '&types=' . serialize($this->parsedTypes) . 'DOCTRINE_QUERY_CACHE_SALT'
753
+            $this->getDQL().serialize($this->hints).
754
+            '&platform='.$platform.
755
+            ($this->em->hasFilters() ? $this->em->getFilters()->getHash() : '').
756
+            '&firstResult='.$this->firstResult.'&maxResult='.$this->maxResults.
757
+            '&hydrationMode='.$this->hydrationMode.'&types='.serialize($this->parsedTypes).'DOCTRINE_QUERY_CACHE_SALT'
758 758
         );
759 759
     }
760 760
 
@@ -763,7 +763,7 @@  discard block
 block discarded – undo
763 763
      */
764 764
     protected function getHash()
765 765
     {
766
-        return sha1(parent::getHash() . '-' . $this->firstResult . '-' . $this->maxResults);
766
+        return sha1(parent::getHash().'-'.$this->firstResult.'-'.$this->maxResults);
767 767
     }
768 768
 
769 769
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
     ) {
143 143
         $this->reverseEngineerMappingFromDatabase();
144 144
 
145
-        if (! isset($this->classToTableNames[$className])) {
146
-            throw new \InvalidArgumentException('Unknown class ' . $className);
145
+        if ( ! isset($this->classToTableNames[$className])) {
146
+            throw new \InvalidArgumentException('Unknown class '.$className);
147 147
         }
148 148
 
149 149
         // @todo guilhermeblanco This should somehow disappear... =)
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                     }
174 174
                 }
175 175
 
176
-                if (! $otherFk) {
176
+                if ( ! $otherFk) {
177 177
                     // the definition of this many to many table does not contain
178 178
                     // enough foreign key information to continue reverse engineering.
179 179
                     continue;
@@ -254,9 +254,9 @@  discard block
 block discarded – undo
254 254
                 $allForeignKeyColumns = array_merge($allForeignKeyColumns, $foreignKey->getLocalColumns());
255 255
             }
256 256
 
257
-            if (! $table->hasPrimaryKey()) {
257
+            if ( ! $table->hasPrimaryKey()) {
258 258
                 throw new Mapping\MappingException(
259
-                    'Table ' . $table->getName() . ' has no primary key. Doctrine does not ' .
259
+                    'Table '.$table->getName().' has no primary key. Doctrine does not '.
260 260
                     "support reverse engineering from tables that don't have a primary key."
261 261
                 );
262 262
             }
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
             }
447 447
 
448 448
             // Here we need to check if $fkColumns are the same as $primaryKeys
449
-            if (! array_diff($fkColumns, $primaryKeys)) {
449
+            if ( ! array_diff($fkColumns, $primaryKeys)) {
450 450
                 $metadata->addProperty($associationMapping);
451 451
             } else {
452 452
                 $metadata->addProperty($associationMapping);
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
      */
492 492
     private function getClassNameForTable($tableName)
493 493
     {
494
-        return $this->namespace . (
494
+        return $this->namespace.(
495 495
             $this->classNamesForTables[$tableName]
496 496
                 ?? Inflector::classify(strtolower($tableName))
497 497
         );
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH6443Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $entity = new GH6443Post();
36 36
         $entity->id = 'Foo';
37 37
 
38
-        $dql = 'SELECT p FROM ' . GH6443Post::class . ' p WHERE p = ?1';
38
+        $dql = 'SELECT p FROM '.GH6443Post::class.' p WHERE p = ?1';
39 39
         $query = $this->em->createQuery($dql);
40 40
 
41 41
         // we do not know that the internal type is a rot13, so we can not add the type parameter here
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $metadata = $this->em->getClassMetadata(GH6443Post::class);
64 64
         $entityProxy = $this->em->getProxyFactory()->getProxy($metadata, ['id' => 'Foo']);
65 65
 
66
-        $dql = 'SELECT p FROM ' . GH6443Post::class . ' p WHERE p = ?1';
66
+        $dql = 'SELECT p FROM '.GH6443Post::class.' p WHERE p = ?1';
67 67
         $query = $this->em->createQuery($dql);
68 68
 
69 69
         // we do not know that the internal type is a rot13, so we can not add the type parameter here
Please login to merge, or discard this patch.