Completed
Push — 2.6 ( 4b0d86...b22604 )
by Luís
37s queued 24s
created
Doctrine/Tests/ORM/Functional/OneToOneInverseSideLoadAfterDqlQueryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
                 $this->_em->getClassMetadata(OwningSide::class),
21 21
                 $this->_em->getClassMetadata(InverseSide::class),
22 22
             ]);
23
-        } catch(ToolsException $e) {
23
+        } catch (ToolsException $e) {
24 24
             // ignored
25 25
         }
26 26
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH7286Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $query = $this->_em->createQuery(
38 38
             'SELECT CONCAT(e.type, MIN(e.version)) pair'
39
-            . ' FROM ' . GH7286Entity::class . ' e'
39
+            . ' FROM '.GH7286Entity::class.' e'
40 40
             . ' WHERE e.type IS NOT NULL'
41 41
             . ' GROUP BY e.type'
42 42
             . ' ORDER BY e.type'
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
         $query = $this->_em->createQuery(
62 62
             'SELECT CC(e.type, MIN(e.version)) pair'
63
-            . ' FROM ' . GH7286Entity::class . ' e'
63
+            . ' FROM '.GH7286Entity::class.' e'
64 64
             . ' WHERE e.type IS NOT NULL AND e.type != :type'
65 65
             . ' GROUP BY e.type'
66 66
         );
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 {
21 21
     protected function _loadDriver()
22 22
     {
23
-        return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml');
23
+        return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml');
24 24
     }
25 25
 
26 26
     public function testClassTableInheritanceDiscriminatorMap()
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function testValidateXmlSchema($xmlMappingFile)
154 154
     {
155
-        $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd';
155
+        $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd';
156 156
         $dom           = new \DOMDocument();
157 157
 
158 158
         $dom->load($xmlMappingFile);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
     static public function dataValidSchema()
164 164
     {
165
-        $list    = glob(__DIR__ . '/xml/*.xml');
165
+        $list    = glob(__DIR__.'/xml/*.xml');
166 166
         $invalid = [
167 167
             'Doctrine.Tests.Models.DDC889.DDC889Class.dcm'
168 168
         ];
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid);
172 172
         });
173 173
 
174
-        return array_map(function($item){
174
+        return array_map(function($item) {
175 175
             return [$item];
176 176
         }, $list);
177 177
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
      */
226 226
     public function transactional($func)
227 227
     {
228
-        if (!is_callable($func)) {
229
-            throw new \InvalidArgumentException('Expected argument of type "callable", got "' . gettype($func) . '"');
228
+        if ( ! is_callable($func)) {
229
+            throw new \InvalidArgumentException('Expected argument of type "callable", got "'.gettype($func).'"');
230 230
         }
231 231
 
232 232
         $this->conn->beginTransaction();
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
      */
763 763
     public function isOpen()
764 764
     {
765
-        return (!$this->closed);
765
+        return ( ! $this->closed);
766 766
     }
767 767
 
768 768
     /**
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
                 sprintf(
874 874
                     'Invalid $connection argument of type %s given%s.',
875 875
                     is_object($connection) ? get_class($connection) : gettype($connection),
876
-                    is_object($connection) ? '' : ': "' . $connection . '"'
876
+                    is_object($connection) ? '' : ': "'.$connection.'"'
877 877
                 )
878 878
             );
879 879
         }
@@ -923,13 +923,13 @@  discard block
 block discarded – undo
923 923
     {
924 924
         switch ($lockMode) {
925 925
             case LockMode::OPTIMISTIC:
926
-                if (!$class->isVersioned) {
926
+                if ( ! $class->isVersioned) {
927 927
                     throw OptimisticLockException::notVersioned($class->name);
928 928
                 }
929 929
                 break;
930 930
             case LockMode::PESSIMISTIC_READ:
931 931
             case LockMode::PESSIMISTIC_WRITE:
932
-                if (!$this->getConnection()->isTransactionActive()) {
932
+                if ( ! $this->getConnection()->isTransactionActive()) {
933 933
                     throw TransactionRequiredException::transactionRequired();
934 934
                 }
935 935
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function exportClassMetadata(ClassMetadataInfo $metadata)
43 43
     {
44
-        $xml = new SimpleXmlElement('<?xml version="1.0" encoding="utf-8"?><doctrine-mapping ' .
45
-            'xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" ' .
46
-            'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' .
44
+        $xml = new SimpleXmlElement('<?xml version="1.0" encoding="utf-8"?><doctrine-mapping '.
45
+            'xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" '.
46
+            'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '.
47 47
             'xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd" />');
48 48
 
49 49
         if ($metadata->isMappedSuperclass) {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
         $trackingPolicy = $this->_getChangeTrackingPolicyString($metadata->changeTrackingPolicy);
100 100
 
101
-        if ( $trackingPolicy != 'DEFERRED_IMPLICIT') {
101
+        if ($trackingPolicy != 'DEFERRED_IMPLICIT') {
102 102
             $root->addChild('change-tracking-policy', $trackingPolicy);
103 103
         }
104 104
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
             }
298 298
 
299 299
             if (count($cascade) === 5) {
300
-                $cascade  = ['cascade-all'];
300
+                $cascade = ['cascade-all'];
301 301
             }
302 302
 
303 303
             if ($cascade) {
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
             }
380 380
         }
381 381
 
382
-        if (isset($metadata->lifecycleCallbacks) && count($metadata->lifecycleCallbacks)>0) {
382
+        if (isset($metadata->lifecycleCallbacks) && count($metadata->lifecycleCallbacks) > 0) {
383 383
             $lifecycleCallbacksXml = $root->addChild('lifecycle-callbacks');
384 384
 
385 385
             foreach ($metadata->lifecycleCallbacks as $name => $methods) {
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
     {
431 431
         $sequenceDefinition = $metadata->sequenceGeneratorDefinition;
432 432
 
433
-        if (! ($metadata->generatorType === ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE && $sequenceDefinition)) {
433
+        if ( ! ($metadata->generatorType === ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE && $sequenceDefinition)) {
434 434
             return;
435 435
         }
436 436
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityManagerInterface.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -242,17 +242,17 @@
 block discarded – undo
242 242
     public function getUnitOfWork();
243 243
 
244 244
     /**
245
-    * Gets a hydrator for the given hydration mode.
246
-    *
247
-    * This method caches the hydrator instances which is used for all queries that don't
248
-    * selectively iterate over the result.
249
-    *
250
-    * @deprecated
251
-    *
252
-    * @param string|int $hydrationMode
253
-    *
254
-    * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator
255
-    */
245
+     * Gets a hydrator for the given hydration mode.
246
+     *
247
+     * This method caches the hydrator instances which is used for all queries that don't
248
+     * selectively iterate over the result.
249
+     *
250
+     * @deprecated
251
+     *
252
+     * @param string|int $hydrationMode
253
+     *
254
+     * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator
255
+     */
256 256
     public function getHydrator($hydrationMode);
257 257
 
258 258
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Performance/Query/QueryBoundParameterProcessingBench.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@
 block discarded – undo
57 57
         $this->parsedQueryWithDeclaredParameterType = $entityManager->createQuery($dql);
58 58
 
59 59
         foreach (range(1, 10) as $index) {
60
-            $this->parsedQueryWithInferredParameterType->setParameter('parameter' . $index, new DateTime());
61
-            $this->parsedQueryWithDeclaredParameterType->setParameter('parameter' . $index, new DateTime(), DateTimeType::DATETIME);
60
+            $this->parsedQueryWithInferredParameterType->setParameter('parameter'.$index, new DateTime());
61
+            $this->parsedQueryWithDeclaredParameterType->setParameter('parameter'.$index, new DateTime(), DateTimeType::DATETIME);
62 62
         }
63 63
 
64 64
         // Force parsing upfront - we don't benchmark that bit in this scenario
Please login to merge, or discard this patch.
tests/Doctrine/Performance/EntityManagerFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
     {
20 20
         $config = new Configuration();
21 21
 
22
-        $config->setProxyDir(__DIR__ . '/../Tests/Proxies');
22
+        $config->setProxyDir(__DIR__.'/../Tests/Proxies');
23 23
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
24 24
         $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL);
25 25
         $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver([
26
-            realpath(__DIR__ . '/Models/Cache'),
27
-            realpath(__DIR__ . '/Models/GeoNames'),
26
+            realpath(__DIR__.'/Models/Cache'),
27
+            realpath(__DIR__.'/Models/GeoNames'),
28 28
         ], true));
29 29
 
30 30
         $entityManager = EntityManager::create(
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $config = new Configuration();
47 47
 
48
-        $config->setProxyDir(__DIR__ . '/../Tests/Proxies');
48
+        $config->setProxyDir(__DIR__.'/../Tests/Proxies');
49 49
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
50 50
         $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL);
51 51
         $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver([
52
-            realpath(__DIR__ . '/Models/Cache'),
53
-            realpath(__DIR__ . '/Models/Generic'),
54
-            realpath(__DIR__ . '/Models/GeoNames'),
52
+            realpath(__DIR__.'/Models/Cache'),
53
+            realpath(__DIR__.'/Models/Generic'),
54
+            realpath(__DIR__.'/Models/GeoNames'),
55 55
         ], true));
56 56
 
57 57
         // A connection that doesn't really do anything
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/QueryExpressionVisitor.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $expressionList[] = $this->dispatch($child);
115 115
         }
116 116
 
117
-        switch($expr->getType()) {
117
+        switch ($expr->getType()) {
118 118
             case CompositeExpression::TYPE_AND:
119 119
                 return new Expr\Andx($expressionList);
120 120
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 return new Expr\Orx($expressionList);
123 123
 
124 124
             default:
125
-                throw new \RuntimeException("Unknown composite " . $expr->getType());
125
+                throw new \RuntimeException("Unknown composite ".$expr->getType());
126 126
         }
127 127
     }
128 128
 
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
             throw new QueryException('No aliases are set before invoking walkComparison().');
137 137
         }
138 138
 
139
-        $field = $this->queryAliases[0] . '.' . $comparison->getField();
139
+        $field = $this->queryAliases[0].'.'.$comparison->getField();
140 140
 
141
-        foreach($this->queryAliases as $alias) {
142
-            if(strpos($comparison->getField() . '.', $alias . '.') === 0) {
141
+        foreach ($this->queryAliases as $alias) {
142
+            if (strpos($comparison->getField().'.', $alias.'.') === 0) {
143 143
                 $field = $comparison->getField();
144 144
                 break;
145 145
             }
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
 
150 150
         foreach ($this->parameters as $parameter) {
151 151
             if ($parameter->getName() === $parameterName) {
152
-                $parameterName .= '_' . count($this->parameters);
152
+                $parameterName .= '_'.count($this->parameters);
153 153
                 break;
154 154
             }
155 155
         }
156 156
 
157 157
         $parameter = new Parameter($parameterName, $this->walkValue($comparison->getValue()));
158
-        $placeholder = ':' . $parameterName;
158
+        $placeholder = ':'.$parameterName;
159 159
 
160 160
         switch ($comparison->getOperator()) {
161 161
             case Comparison::IN:
@@ -182,19 +182,19 @@  discard block
 block discarded – undo
182 182
 
183 183
                 return $this->expr->neq($field, $placeholder);
184 184
             case Comparison::CONTAINS:
185
-                $parameter->setValue('%' . $parameter->getValue() . '%', $parameter->getType());
185
+                $parameter->setValue('%'.$parameter->getValue().'%', $parameter->getType());
186 186
                 $this->parameters[] = $parameter;
187 187
 
188 188
                 return $this->expr->like($field, $placeholder);
189 189
             case Comparison::MEMBER_OF:
190 190
                 return $this->expr->isMemberOf($comparison->getField(), $comparison->getValue()->getValue());
191 191
             case Comparison::STARTS_WITH:
192
-                $parameter->setValue($parameter->getValue() . '%', $parameter->getType());
192
+                $parameter->setValue($parameter->getValue().'%', $parameter->getType());
193 193
                 $this->parameters[] = $parameter;
194 194
 
195 195
                 return $this->expr->like($field, $placeholder);
196 196
             case Comparison::ENDS_WITH:
197
-                $parameter->setValue('%' . $parameter->getValue(), $parameter->getType());
197
+                $parameter->setValue('%'.$parameter->getValue(), $parameter->getType());
198 198
                 $this->parameters[] = $parameter;
199 199
 
200 200
                 return $this->expr->like($field, $placeholder);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                     );
211 211
                 }
212 212
 
213
-                throw new \RuntimeException("Unknown comparison operator: " . $comparison->getOperator());
213
+                throw new \RuntimeException("Unknown comparison operator: ".$comparison->getOperator());
214 214
         }
215 215
     }
216 216
 
Please login to merge, or discard this patch.