Completed
Pull Request — master (#7902)
by
unknown
63:54
created
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
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $config = new Configuration();
27 27
 
28
-        $config->setProxyDir(__DIR__ . '/../Tests/Proxies');
28
+        $config->setProxyDir(__DIR__.'/../Tests/Proxies');
29 29
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
30 30
         $config->setAutoGenerateProxyClasses(StaticProxyFactory::AUTOGENERATE_EVAL);
31 31
         $config->setMetadataDriverImpl(
32 32
             $config->newDefaultAnnotationDriver([
33
-                \realpath(__DIR__ . '/Models/Cache'),
34
-                \realpath(__DIR__ . '/Models/GeoNames'),
33
+                \realpath(__DIR__.'/Models/Cache'),
34
+                \realpath(__DIR__.'/Models/GeoNames'),
35 35
             ])
36 36
         );
37 37
 
@@ -53,15 +53,15 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $config = new Configuration();
55 55
 
56
-        $config->setProxyDir(__DIR__ . '/../Tests/Proxies');
56
+        $config->setProxyDir(__DIR__.'/../Tests/Proxies');
57 57
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
58 58
         $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL);
59 59
         $config->setMetadataDriverImpl(
60 60
             $config->newDefaultAnnotationDriver(
61 61
                 [
62
-                    \realpath(__DIR__ . '/Models/Cache'),
63
-                    \realpath(__DIR__ . '/Models/Generic'),
64
-                    \realpath(__DIR__ . '/Models/GeoNames'),
62
+                    \realpath(__DIR__.'/Models/Cache'),
63
+                    \realpath(__DIR__.'/Models/Generic'),
64
+                    \realpath(__DIR__.'/Models/GeoNames'),
65 65
                 ]
66 66
             )
67 67
         );
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Proxy/ProxyFactoryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                     self::isInstanceOf(CompanyEmployee::class)
235 235
                 )
236 236
             )
237
-            ->willReturnCallback(static function (array $id, CompanyEmployee $companyEmployee) {
237
+            ->willReturnCallback(static function(array $id, CompanyEmployee $companyEmployee) {
238 238
                 $companyEmployee->setSalary(1000); // A property on the CompanyEmployee
239 239
                 $companyEmployee->setName('Bob'); // A property on the parent class, CompanyPerson
240 240
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
                     self::isInstanceOf(ComparableObject::class)
297 297
                 )
298 298
             )
299
-            ->willReturnCallback(static function (array $id, ComparableObject $comparableObject) {
299
+            ->willReturnCallback(static function(array $id, ComparableObject $comparableObject) {
300 300
                 $comparableObject->setComparedFieldValue(\json_encode($id));
301 301
 
302 302
                 return $comparableObject;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Internal/HydrationCompleteHandlerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 $metadata,
71 71
                 Events::postLoad,
72 72
                 $entity,
73
-                $this->callback(static function (LifecycleEventArgs $args) use ($entityManager, $entity) {
73
+                $this->callback(static function(LifecycleEventArgs $args) use ($entityManager, $entity) {
74 74
                     return $entity === $args->getEntity() && $entityManager === $args->getObjectManager();
75 75
                 }),
76 76
                 $listenersFlag
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                 $this->logicalOr($metadata1, $metadata2),
139 139
                 Events::postLoad,
140 140
                 $this->logicalOr($entity1, $entity2),
141
-                $this->callback(static function (LifecycleEventArgs $args) use ($entityManager, $entity1, $entity2) {
141
+                $this->callback(static function(LifecycleEventArgs $args) use ($entityManager, $entity1, $entity2) {
142 142
                     return \in_array($args->getEntity(), [$entity1, $entity2], true)
143 143
                         && $entityManager === $args->getObjectManager();
144 144
                 }),
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/SetupTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function tearDown() : void
37 37
     {
38
-        if (! $this->originalIncludePath) {
38
+        if ( ! $this->originalIncludePath) {
39 39
             return;
40 40
         }
41 41
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $config = Setup::createConfiguration(false, __DIR__);
75 75
         $cache  = $config->getMetadataCacheImpl();
76 76
 
77
-        self::assertSame('dc2_' . \md5(__DIR__) . '_', $cache->getNamespace());
77
+        self::assertSame('dc2_'.\md5(__DIR__).'_', $cache->getNamespace());
78 78
     }
79 79
 
80 80
     /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $config = Setup::createConfiguration(false, __DIR__, new ArrayCache());
86 86
         $cache  = $config->getMetadataCacheImpl();
87 87
 
88
-        self::assertSame('dc2_' . \md5(__DIR__) . '_', $cache->getNamespace());
88
+        self::assertSame('dc2_'.\md5(__DIR__).'_', $cache->getNamespace());
89 89
     }
90 90
 
91 91
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $cache  = $config->getMetadataCacheImpl();
101 101
 
102 102
         self::assertSame($originalCache, $cache);
103
-        self::assertSame('foo:dc2_' . \md5(__DIR__) . '_', $cache->getNamespace());
103
+        self::assertSame('foo:dc2_'.\md5(__DIR__).'_', $cache->getNamespace());
104 104
     }
105 105
 
106 106
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTestCase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $driver = new DatabaseDriver($sm);
65 65
 
66 66
         foreach ($driver->getAllClassNames() as $className) {
67
-            if (! \in_array(\strtolower($className), $classNames, true)) {
67
+            if ( ! \in_array(\strtolower($className), $classNames, true)) {
68 68
                 continue;
69 69
             }
70 70
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         }
75 75
 
76 76
         if (\count($metadataList) !== \count($classNames)) {
77
-            $this->fail("Have not found all classes matching the names '" . \implode(', ', $classNames) . "' only tables " . \implode(', ', \array_keys($metadataList)));
77
+            $this->fail("Have not found all classes matching the names '".\implode(', ', $classNames)."' only tables ".\implode(', ', \array_keys($metadataList)));
78 78
         }
79 79
 
80 80
         return $metadataList;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
     protected function setUp() : void
26 26
     {
27
-        if (! \class_exists('GearmanClient', false)) {
27
+        if ( ! \class_exists('GearmanClient', false)) {
28 28
             $this->markTestSkipped('pecl/gearman is required for this test to run.');
29 29
         }
30 30
 
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
 
142 142
         self::assertTrue(
143 143
             $this->maxRunTime > $forTime,
144
-            'Because of locking this tests should have run at least ' . $forTime . ' seconds, ' .
145
-            'but only did for ' . $this->maxRunTime . ' seconds.'
144
+            'Because of locking this tests should have run at least '.$forTime.' seconds, '.
145
+            'but only did for '.$this->maxRunTime.' seconds.'
146 146
         );
147 147
         self::assertTrue(
148 148
             $this->maxRunTime < $notLongerThan,
149
-            'The longest task should not run longer than ' . $notLongerThan . ' seconds, ' .
150
-            'but did for ' . $this->maxRunTime . ' seconds.'
149
+            'The longest task should not run longer than '.$notLongerThan.' seconds, '.
150
+            'but did for '.$this->maxRunTime.' seconds.'
151 151
         );
152 152
     }
153 153
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/LockAgentWorker.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         while ($worker->work()) {
38 38
             if ($worker->returnCode() !== GEARMAN_SUCCESS) {
39
-                echo 'return_code: ' . $worker->returnCode() . "\n";
39
+                echo 'return_code: '.$worker->returnCode()."\n";
40 40
                 break;
41 41
             }
42 42
         }
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function findWithLock($job)
63 63
     {
64
-        return $this->process($job, static function ($fixture, $em) {
64
+        return $this->process($job, static function($fixture, $em) {
65 65
             $entity = $em->find($fixture['entityName'], $fixture['entityId'], $fixture['lockMode']);
66 66
         });
67 67
     }
68 68
 
69 69
     public function dqlWithLock($job)
70 70
     {
71
-        return $this->process($job, static function ($fixture, $em) {
71
+        return $this->process($job, static function($fixture, $em) {
72 72
             /** @var Doctrine\ORM\Query $query */
73 73
             $query = $em->createQuery($fixture['dql']);
74 74
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function lock($job)
82 82
     {
83
-        return $this->process($job, static function ($fixture, $em) {
83
+        return $this->process($job, static function($fixture, $em) {
84 84
             $entity = $em->find($fixture['entityName'], $fixture['entityId']);
85 85
 
86 86
             $em->lock($entity, $fixture['lockMode']);
@@ -89,18 +89,18 @@  discard block
 block discarded – undo
89 89
 
90 90
     protected function processWorkload($job)
91 91
     {
92
-        echo 'Received job: ' . $job->handle() . ' for function ' . $job->functionName() . "\n";
92
+        echo 'Received job: '.$job->handle().' for function '.$job->functionName()."\n";
93 93
 
94 94
         $workload = $job->workload();
95 95
         $workload = \unserialize($workload);
96 96
 
97
-        if (! isset($workload['conn']) || ! \is_array($workload['conn'])) {
97
+        if ( ! isset($workload['conn']) || ! \is_array($workload['conn'])) {
98 98
             throw new InvalidArgumentException('Missing Database parameters');
99 99
         }
100 100
 
101 101
         $this->em = $this->createEntityManager($workload['conn']);
102 102
 
103
-        if (! isset($workload['fixture'])) {
103
+        if ( ! isset($workload['fixture'])) {
104 104
             throw new InvalidArgumentException('Missing Fixture parameters');
105 105
         }
106 106
 
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
     protected function createEntityManager($conn)
111 111
     {
112 112
         $config = new Configuration();
113
-        $config->setProxyDir(__DIR__ . '/../../../Proxies');
113
+        $config->setProxyDir(__DIR__.'/../../../Proxies');
114 114
         $config->setProxyNamespace('MyProject\Proxies');
115 115
         $config->setAutoGenerateProxyClasses(true);
116 116
 
117
-        $annotDriver = $config->newDefaultAnnotationDriver([__DIR__ . '/../../../Models/']);
117
+        $annotDriver = $config->newDefaultAnnotationDriver([__DIR__.'/../../../Models/']);
118 118
         $config->setMetadataDriverImpl($annotDriver);
119 119
 
120 120
         $cache = new ArrayCache();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SQLFilterTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
             'locale' => ['value' => 'en', 'type' => DBALType::STRING],
336 336
         ];
337 337
 
338
-        self::assertEquals(\serialize($parameters), '' . $filter);
339
-        self::assertEquals('' . $filter, '' . $filter2);
338
+        self::assertEquals(\serialize($parameters), ''.$filter);
339
+        self::assertEquals(''.$filter, ''.$filter2);
340 340
     }
341 341
 
342 342
     public function testQueryCacheDependsOnFilters() : void
@@ -1105,7 +1105,7 @@  discard block
 block discarded – undo
1105 1105
             return '';
1106 1106
         }
1107 1107
 
1108
-        return $targetTableAlias . '.deleted = 0';
1108
+        return $targetTableAlias.'.deleted = 0';
1109 1109
     }
1110 1110
 }
1111 1111
 
@@ -1113,11 +1113,11 @@  discard block
 block discarded – undo
1113 1113
 {
1114 1114
     public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
1115 1115
     {
1116
-        if (! \in_array('LocaleAware', $targetEntity->getReflectionClass()->getInterfaceNames(), true)) {
1116
+        if ( ! \in_array('LocaleAware', $targetEntity->getReflectionClass()->getInterfaceNames(), true)) {
1117 1117
             return '';
1118 1118
         }
1119 1119
 
1120
-        return $targetTableAlias . '.locale = ' . $this->getParameter('locale'); // getParam uses connection to quote the value.
1120
+        return $targetTableAlias.'.locale = '.$this->getParameter('locale'); // getParam uses connection to quote the value.
1121 1121
     }
1122 1122
 }
1123 1123
 
@@ -1129,7 +1129,7 @@  discard block
 block discarded – undo
1129 1129
             return '';
1130 1130
         }
1131 1131
 
1132
-        return $targetTableAlias . '.country = ' . $this->getParameter('country'); // getParam uses connection to quote the value.
1132
+        return $targetTableAlias.'.country = '.$this->getParameter('country'); // getParam uses connection to quote the value.
1133 1133
     }
1134 1134
 }
1135 1135
 
@@ -1141,7 +1141,7 @@  discard block
 block discarded – undo
1141 1141
             return '';
1142 1142
         }
1143 1143
 
1144
-        return $targetTableAlias . '.name LIKE ' . $this->getParameter('prefix'); // getParam uses connection to quote the value.
1144
+        return $targetTableAlias.'.name LIKE '.$this->getParameter('prefix'); // getParam uses connection to quote the value.
1145 1145
     }
1146 1146
 }
1147 1147
 
@@ -1153,7 +1153,7 @@  discard block
 block discarded – undo
1153 1153
             return '';
1154 1154
         }
1155 1155
 
1156
-        return $targetTableAlias . '.topic = ' . $this->getParameter('topic'); // getParam uses connection to quote the value.
1156
+        return $targetTableAlias.'.topic = '.$this->getParameter('topic'); // getParam uses connection to quote the value.
1157 1157
     }
1158 1158
 }
1159 1159
 
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
             return '';
1166 1166
         }
1167 1167
 
1168
-        return $targetTableAlias . '.name LIKE ' . $this->getParameter('name');
1168
+        return $targetTableAlias.'.name LIKE '.$this->getParameter('name');
1169 1169
     }
1170 1170
 }
1171 1171
 
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
             return '';
1178 1178
         }
1179 1179
 
1180
-        return $targetTableAlias . '."completed" = ' . $this->getParameter('completed');
1180
+        return $targetTableAlias.'."completed" = '.$this->getParameter('completed');
1181 1181
     }
1182 1182
 }
1183 1183
 
@@ -1189,6 +1189,6 @@  discard block
 block discarded – undo
1189 1189
             return '';
1190 1190
         }
1191 1191
 
1192
-        return $targetTableAlias . '.id = ' . $this->getParameter('id');
1192
+        return $targetTableAlias.'.id = '.$this->getParameter('id');
1193 1193
     }
1194 1194
 }
Please login to merge, or discard this patch.