Completed
Push — 2.6 ( 4b0d86...b22604 )
by Luís
37s queued 24s
created
lib/Doctrine/ORM/Cache/Region/DefaultMultiGetRegion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         $returnableItems = [];
71 71
 
72 72
         foreach ($keysToRetrieve as $index => $key) {
73
-            if (! $items[$key] instanceof CacheEntry) {
73
+            if ( ! $items[$key] instanceof CacheEntry) {
74 74
                 return null;
75 75
             }
76 76
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/Region/DefaultRegion.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     {
97 97
         $entry = $this->cache->fetch($this->getCacheEntryKey($key));
98 98
 
99
-        if (! $entry instanceof CacheEntry) {
99
+        if ( ! $entry instanceof CacheEntry) {
100 100
             return null;
101 101
         }
102 102
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $entryKey   = $this->getCacheEntryKey($key);
115 115
             $entryValue = $this->cache->fetch($entryKey);
116 116
 
117
-            if (! $entryValue instanceof CacheEntry) {
117
+            if ( ! $entryValue instanceof CacheEntry) {
118 118
                 return null;
119 119
             }
120 120
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     protected function getCacheEntryKey(CacheKey $key)
132 132
     {
133
-        return $this->name . self::REGION_KEY_SEPARATOR . $key->hash;
133
+        return $this->name.self::REGION_KEY_SEPARATOR.$key->hash;
134 134
     }
135 135
 
136 136
     /**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public function evictAll()
156 156
     {
157
-        if (! $this->cache instanceof ClearableCache) {
157
+        if ( ! $this->cache instanceof ClearableCache) {
158 158
             throw new \BadMethodCallException(sprintf(
159 159
                 'Clearing all cache entries is not supported by the supplied cache adapter of type %s',
160 160
                 get_class($this->cache)
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/DefaultRegionTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     public function corruptedDataDoesNotLeakIntoApplicationWhenGettingSingleEntry() : void
104 104
     {
105 105
         $key1 = new CacheKeyMock('key.1');
106
-        $this->cache->save($this->region->getName() . '_' . $key1->hash, 'a-very-invalid-value');
106
+        $this->cache->save($this->region->getName().'_'.$key1->hash, 'a-very-invalid-value');
107 107
 
108 108
         self::assertTrue($this->region->contains($key1));
109 109
         self::assertNull($this->region->get($key1));
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public function corruptedDataDoesNotLeakIntoApplicationWhenGettingMultipleEntries() : void
117 117
     {
118 118
         $key1 = new CacheKeyMock('key.1');
119
-        $this->cache->save($this->region->getName() . '_' . $key1->hash, 'a-very-invalid-value');
119
+        $this->cache->save($this->region->getName().'_'.$key1->hash, 'a-very-invalid-value');
120 120
 
121 121
         self::assertTrue($this->region->contains($key1));
122 122
         self::assertNull($this->region->getMultiple(new CollectionCacheEntry([$key1])));
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/MultiGetRegionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     public function corruptedDataDoesNotLeakIntoApplication() : void
48 48
     {
49 49
         $key1 = new CacheKeyMock('key.1');
50
-        $this->cache->save($this->region->getName() . '_' . $key1->hash, 'a-very-invalid-value');
50
+        $this->cache->save($this->region->getName().'_'.$key1->hash, 'a-very-invalid-value');
51 51
 
52 52
         self::assertTrue($this->region->contains($key1));
53 53
         self::assertNull($this->region->getMultiple(new CollectionCacheEntry([$key1])));
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Parser.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
         $tokenStr = substr($dql, $token['position'], $length);
488 488
 
489 489
         // Building informative message
490
-        $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message;
490
+        $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message;
491 491
 
492 492
         throw QueryException::semanticalError($message, QueryException::dqlError($this->query->getDQL()));
493 493
     }
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
             // If the namespace is not given then assumes the first FROM entity namespace
635 635
             if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) {
636 636
                 $namespace  = substr($fromClassName, 0, strrpos($fromClassName, '\\'));
637
-                $fqcn       = $namespace . '\\' . $className;
637
+                $fqcn       = $namespace.'\\'.$className;
638 638
 
639 639
                 if (class_exists($fqcn)) {
640 640
                     $expression->className  = $fqcn;
@@ -686,13 +686,13 @@  discard block
 block discarded – undo
686 686
                 }
687 687
 
688 688
                 $this->semanticalError(
689
-                    "There is no mapped field named '$field' on class " . $class->name . ".", $deferredItem['token']
689
+                    "There is no mapped field named '$field' on class ".$class->name.".", $deferredItem['token']
690 690
                 );
691 691
             }
692 692
 
693 693
             if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) {
694 694
                 $this->semanticalError(
695
-                    "The partial field selection of class " . $class->name . " must contain the identifier.",
695
+                    "The partial field selection of class ".$class->name." must contain the identifier.",
696 696
                     $deferredItem['token']
697 697
                 );
698 698
             }
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
             // Check if field or association exists
762 762
             if ( ! isset($class->associationMappings[$field]) && ! isset($class->fieldMappings[$field])) {
763 763
                 $this->semanticalError(
764
-                    'Class ' . $class->name . ' has no field or association named ' . $field,
764
+                    'Class '.$class->name.' has no field or association named '.$field,
765 765
                     $deferredItem['token']
766 766
                 );
767 767
             }
@@ -801,8 +801,8 @@  discard block
 block discarded – undo
801 801
                 // Build the error message
802 802
                 $semanticalError  = 'Invalid PathExpression. ';
803 803
                 $semanticalError .= (count($expectedStringTypes) == 1)
804
-                    ? 'Must be a ' . $expectedStringTypes[0] . '.'
805
-                    : implode(' or ', $expectedStringTypes) . ' expected.';
804
+                    ? 'Must be a '.$expectedStringTypes[0].'.'
805
+                    : implode(' or ', $expectedStringTypes).' expected.';
806 806
 
807 807
                 $this->semanticalError($semanticalError, $deferredItem['token']);
808 808
             }
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
 
977 977
         [$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token['value']);
978 978
 
979
-        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
979
+        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName;
980 980
     }
981 981
 
982 982
     /**
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
      */
989 989
     private function validateAbstractSchemaName($schemaName)
990 990
     {
991
-        if (! (class_exists($schemaName, true) || interface_exists($schemaName, true))) {
991
+        if ( ! (class_exists($schemaName, true) || interface_exists($schemaName, true))) {
992 992
             $this->semanticalError("Class '$schemaName' is not defined.", $this->lexer->token);
993 993
         }
994 994
     }
@@ -1044,7 +1044,7 @@  discard block
 block discarded – undo
1044 1044
 
1045 1045
         if ( ! isset($this->queryComponents[$identVariable])) {
1046 1046
             $this->semanticalError(
1047
-                'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.'
1047
+                'Identification Variable '.$identVariable.' used in join path expression but was not defined before.'
1048 1048
             );
1049 1049
         }
1050 1050
 
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
         $class = $qComp['metadata'];
1059 1059
 
1060 1060
         if ( ! $class->hasAssociation($field)) {
1061
-            $this->semanticalError('Class ' . $class->name . ' has no association named ' . $field);
1061
+            $this->semanticalError('Class '.$class->name.' has no association named '.$field);
1062 1062
         }
1063 1063
 
1064 1064
         return new AST\JoinAssociationPathExpression($identVariable, $field);
@@ -2587,7 +2587,7 @@  discard block
 block discarded – undo
2587 2587
             return $this->NullComparisonExpression();
2588 2588
         }
2589 2589
 
2590
-        if ($token['type'] === Lexer::T_IS  && $lookahead['type'] === Lexer::T_EMPTY) {
2590
+        if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) {
2591 2591
             return $this->EmptyCollectionComparisonExpression();
2592 2592
         }
2593 2593
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/PersistentCollection.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
      */
402 402
     public function containsKey($key)
403 403
     {
404
-        if (! $this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY
404
+        if ( ! $this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY
405 405
             && isset($this->association['indexBy'])) {
406 406
             $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
407 407
 
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
             && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY
435 435
             && isset($this->association['indexBy'])
436 436
         ) {
437
-            if (!$this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) {
437
+            if ( ! $this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) {
438 438
                 return $this->em->find($this->typeClass->name, $key);
439 439
             }
440 440
 
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
      */
450 450
     public function count()
451 451
     {
452
-        if (! $this->initialized && $this->association !== null && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY) {
452
+        if ( ! $this->initialized && $this->association !== null && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY) {
453 453
             $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
454 454
 
455 455
             return $persister->count($this) + ($this->isDirty ? $this->collection->count() : 0);
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
         if ($this->association['isOwningSide'] && $this->owner) {
568 568
             $this->changed();
569 569
 
570
-            if (! $this->em->getClassMetadata(get_class($this->owner))->isChangeTrackingDeferredExplicit()) {
570
+            if ( ! $this->em->getClassMetadata(get_class($this->owner))->isChangeTrackingDeferredExplicit()) {
571 571
                 $uow->scheduleCollectionDeletion($this);
572 572
             }
573 573
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH7820Test.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         parent::setUp();
49 49
 
50
-        if (! Type::hasType(GH7820LineTextType::class)) {
50
+        if ( ! Type::hasType(GH7820LineTextType::class)) {
51 51
             Type::addType(GH7820LineTextType::class, GH7820LineTextType::class);
52 52
         }
53 53
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         self::assertSame(
70 70
             self::SONG,
71
-            array_map(static function (GH7820Line $line) : string {
71
+            array_map(static function(GH7820Line $line) : string {
72 72
                 return $line->toString();
73 73
             }, iterator_to_array(new Paginator($query)))
74 74
         );
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
     public function __toString() : string
127 127
     {
128
-        return 'Line: ' . $this->text;
128
+        return 'Line: '.$this->text;
129 129
     }
130 130
 }
131 131
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $text = parent::convertToPHPValue($value, $platform);
137 137
 
138
-        if (! is_string($text)) {
138
+        if ( ! is_string($text)) {
139 139
             return $text;
140 140
         }
141 141
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
     public function convertToDatabaseValue($value, AbstractPlatform $platform)
146 146
     {
147
-        if (! $value instanceof GH7820LineText) {
147
+        if ( ! $value instanceof GH7820LineText) {
148 148
             return parent::convertToDatabaseValue($value, $platform);
149 149
         }
150 150
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Pagination/WhereInWalkerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     {
19 19
         parent::setUp();
20 20
 
21
-        if (! Type::hasType('rot13')) {
21
+        if ( ! Type::hasType('rot13')) {
22 22
             Type::addType('rot13', Rot13Type::class);
23 23
         }
24 24
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     public function testWhereInQueryWithArbitraryJoin_NoWhere()
190 190
     {
191
-        $whereInQuery  = $this->entityManager->createQuery(
191
+        $whereInQuery = $this->entityManager->createQuery(
192 192
             'SELECT p FROM Doctrine\Tests\ORM\Tools\Pagination\BlogPost p JOIN Doctrine\Tests\ORM\Tools\Pagination\Category c WITH p.category = c'
193 193
         );
194 194
         $whereInQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, [WhereInWalker::class]);
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     public function testWillReplaceBoundQueryIdentifiersWithConvertedTypesAsPerIdentifierMapping() : void
228 228
     {
229 229
         $whereInQuery = $this->entityManager->createQuery(
230
-            'SELECT e.id4 FROM ' . AuxiliaryEntity::class . ' e'
230
+            'SELECT e.id4 FROM '.AuxiliaryEntity::class.' e'
231 231
         );
232 232
         $whereInQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, [WhereInWalker::class]);
233 233
         $whereInQuery->setHint(WhereInWalker::HINT_PAGINATOR_ID_COUNT, 3);
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     public function testWillReplaceBoundQueryIdentifiersWithConvertedTypesAsPerAssociatedEntityIdentifierMapping() : void
243 243
     {
244 244
         $whereInQuery = $this->entityManager->createQuery(
245
-            'SELECT e FROM ' . OwningManyToOneIdForeignKeyEntity::class . ' e'
245
+            'SELECT e FROM '.OwningManyToOneIdForeignKeyEntity::class.' e'
246 246
         );
247 247
         $whereInQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, [WhereInWalker::class]);
248 248
         $whereInQuery->setHint(WhereInWalker::HINT_PAGINATOR_ID_COUNT, 3);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 [$pathExpression]
109 109
             );
110 110
             $expression = new InExpression($arithmeticExpression);
111
-            $expression->literals[] = new InputParameter(":" . self::PAGINATOR_ID_ALIAS);
111
+            $expression->literals[] = new InputParameter(":".self::PAGINATOR_ID_ALIAS);
112 112
 
113 113
             $this->convertWhereInIdentifiersToDatabaseValue(
114 114
                 PersisterHelper::getTypeOfField(
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             ->getEntityManager()
178 178
             ->getConnection();
179 179
 
180
-        $query->setParameter(self::PAGINATOR_ID_ALIAS, array_map(static function ($id) use ($connection, $type) {
180
+        $query->setParameter(self::PAGINATOR_ID_ALIAS, array_map(static function($id) use ($connection, $type) {
181 181
             return $connection->convertToDatabaseValue($id, $type);
182 182
         }, $identifiers));
183 183
     }
Please login to merge, or discard this patch.