Cancelled
Pull Request — master (#8013)
by Roman
09:04
created
lib/Doctrine/ORM/Query.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         $types = [];
219 219
 
220 220
         foreach ($this->parameters as $parameter) {
221
-            if (!$parameter instanceof Parameter) {
221
+            if ( ! $parameter instanceof Parameter) {
222 222
                 throw new QueryException('Set parameter must be instance of \Doctrine\ORM\Query\Parameter');
223 223
             }
224 224
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
         // Check query cache.
237 237
         $queryCache = $this->getQueryCacheDriver();
238
-        if (! ($this->useQueryCache && $queryCache)) {
238
+        if ( ! ($this->useQueryCache && $queryCache)) {
239 239
             $parser = new Parser($this);
240 240
 
241 241
             $this->parserResult = $parser->parse();
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         foreach ($this->parameters as $parameter) {
371 371
             $key = $parameter->getName();
372 372
 
373
-            if (! isset($paramMappings[$key])) {
373
+            if ( ! isset($paramMappings[$key])) {
374 374
                 throw QueryException::unknownParameter($key);
375 375
             }
376 376
 
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
     public function setLockMode($lockMode)
700 700
     {
701 701
         if (in_array($lockMode, [LockMode::NONE, LockMode::PESSIMISTIC_READ, LockMode::PESSIMISTIC_WRITE], true)) {
702
-            if (! $this->em->getConnection()->isTransactionActive()) {
702
+            if ( ! $this->em->getConnection()->isTransactionActive()) {
703 703
                 throw TransactionRequiredException::transactionRequired();
704 704
             }
705 705
         }
@@ -740,11 +740,11 @@  discard block
 block discarded – undo
740 740
             ->getName();
741 741
 
742 742
         return md5(
743
-            $this->getDQL() . serialize($this->hints) .
744
-            '&platform=' . $platform .
745
-            ($this->em->hasFilters() ? $this->em->getFilters()->getHash() : '') .
746
-            '&firstResult=' . $this->firstResult . '&maxResult=' . $this->maxResults .
747
-            '&hydrationMode=' . $this->hydrationMode . '&types=' . serialize($this->parsedTypes) . 'DOCTRINE_QUERY_CACHE_SALT'
743
+            $this->getDQL().serialize($this->hints).
744
+            '&platform='.$platform.
745
+            ($this->em->hasFilters() ? $this->em->getFilters()->getHash() : '').
746
+            '&firstResult='.$this->firstResult.'&maxResult='.$this->maxResults.
747
+            '&hydrationMode='.$this->hydrationMode.'&types='.serialize($this->parsedTypes).'DOCTRINE_QUERY_CACHE_SALT'
748 748
         );
749 749
     }
750 750
 
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
      */
754 754
     protected function getHash()
755 755
     {
756
-        return sha1(parent::getHash() . '-' . $this->firstResult . '-' . $this->maxResults);
756
+        return sha1(parent::getHash().'-'.$this->firstResult.'-'.$this->maxResults);
757 757
     }
758 758
 
759 759
     /**
Please login to merge, or discard this patch.