Completed
Pull Request — master (#7046)
by Gabriel
12:30
created
tests/Doctrine/Tests/ORM/Functional/Locking/LockTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Locking;
6 6
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $article = new CmsArticle();
90 90
 
91 91
         $this->expectException(\InvalidArgumentException::class);
92
-        $this->expectExceptionMessage('Entity ' . CmsArticle::class);
92
+        $this->expectExceptionMessage('Entity '.CmsArticle::class);
93 93
 
94 94
         $this->em->lock($article, LockMode::OPTIMISTIC, $article->version + 1);
95 95
     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     {
139 139
         $writeLockSql = $this->em->getConnection()->getDatabasePlatform()->getWriteLockSQL();
140 140
 
141
-        if (! $writeLockSql) {
141
+        if ( ! $writeLockSql) {
142 142
             $this->markTestSkipped('Database Driver has no Write Lock support.');
143 143
         }
144 144
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     {
174 174
         $readLockSql = $this->em->getConnection()->getDatabasePlatform()->getReadLockSQL();
175 175
 
176
-        if (! $readLockSql) {
176
+        if ( ! $readLockSql) {
177 177
             $this->markTestSkipped('Database Driver has no Write Lock support.');
178 178
         }
179 179
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      */
207 207
     public function testLockOptimisticNonVersionedThrowsExceptionInDQL()
208 208
     {
209
-        $dql = 'SELECT u FROM ' . CmsUser::class . " u WHERE u.username = 'gblanco'";
209
+        $dql = 'SELECT u FROM '.CmsUser::class." u WHERE u.username = 'gblanco'";
210 210
 
211 211
         $this->expectException(OptimisticLockException::class);
212 212
         $this->expectExceptionMessage('The optimistic lock on an entity failed.');
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\Locking;
6 6
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function setUp()
21 21
     {
22
-        if (! class_exists('GearmanClient', false)) {
22
+        if ( ! class_exists('GearmanClient', false)) {
23 23
             $this->markTestSkipped('pecl/gearman is required for this test to run.');
24 24
         }
25 25
 
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
         $this->gearman->runTasks();
136 136
 
137 137
         self::assertTrue($this->maxRunTime > $forTime,
138
-            'Because of locking this tests should have run at least ' . $forTime . ' seconds, ' .
139
-            'but only did for ' . $this->maxRunTime . ' seconds.');
138
+            'Because of locking this tests should have run at least '.$forTime.' seconds, '.
139
+            'but only did for '.$this->maxRunTime.' seconds.');
140 140
         self::assertTrue($this->maxRunTime < $notLongerThan,
141
-            'The longest task should not run longer than ' . $notLongerThan . ' seconds, ' .
142
-            'but did for ' . $this->maxRunTime . ' seconds.'
141
+            'The longest task should not run longer than '.$notLongerThan.' seconds, '.
142
+            'but did for '.$this->maxRunTime.' seconds.'
143 143
         );
144 144
     }
145 145
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/CompanySchemaTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\SchemaTool;
6 6
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function testDropPartSchemaWithForeignKeys()
59 59
     {
60
-        if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
60
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
61 61
             $this->markTestSkipped('Foreign Key test');
62 62
         }
63 63
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/DDC214Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\SchemaTool;
6 6
 
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
         $sql = $schemaDiff->toSql($this->em->getConnection()->getDatabasePlatform());
87 87
         $sql = array_filter($sql, function($sql) { return strpos($sql, 'DROP') === false; });
88 88
 
89
-        self::assertCount(0, $sql, 'SQL: ' . implode(PHP_EOL, $sql));
89
+        self::assertCount(0, $sql, 'SQL: '.implode(PHP_EOL, $sql));
90 90
     }
91 91
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\SchemaTool;
6 6
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         parent::setUp();
17 17
 
18 18
         if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'postgresql') {
19
-            $this->markTestSkipped('The ' . __CLASS__ . ' requires the use of postgresql.');
19
+            $this->markTestSkipped('The '.__CLASS__.' requires the use of postgresql.');
20 20
         }
21 21
     }
22 22
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional\SchemaTool;
6 6
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         parent::setUp();
17 17
         if ($this->em->getConnection()->getDatabasePlatform()->getName() !== 'mysql') {
18
-            $this->markTestSkipped('The ' . __CLASS__ . ' requires the use of mysql.');
18
+            $this->markTestSkipped('The '.__CLASS__.' requires the use of mysql.');
19 19
         }
20 20
     }
21 21
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -234,8 +234,8 @@  discard block
 block discarded – undo
234 234
         $eventManager->addEventListener([Events::postLoad], $listener);
235 235
 
236 236
         $this->em->find(CmsUser::class, $this->userId);
237
-        self::assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class . ' should be handled once!');
238
-        self::assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class . ' should be handled once!');
237
+        self::assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class.' should be handled once!');
238
+        self::assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class.' should be handled once!');
239 239
     }
240 240
 
241 241
     private function loadFixture()
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
     {
312 312
         $object = $event->getObject();
313 313
         $class = StaticClassNameConverter::getClass($object);
314
-        if (! isset($this->firedByClasses[$class])) {
314
+        if ( ! isset($this->firedByClasses[$class])) {
315 315
             $this->firedByClasses[$class] = 1;
316 316
         } else {
317 317
             $this->firedByClasses[$class]++;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SchemaValidatorTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     private function registerType(string $className)
38 38
     {
39
-        $type = constant($className . '::NAME');
39
+        $type = constant($className.'::NAME');
40 40
 
41 41
         if (DBALType::hasType($type)) {
42 42
             DBALType::overrideType($type, $className);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         foreach ($classes as $class) {
73 73
             $ce = $validator->validateClass($class);
74 74
 
75
-            self::assertEmpty($ce, 'Invalid Modelset: ' . $modelSet . ' class ' . $class->getClassName() . ': ' . implode("\n", $ce));
75
+            self::assertEmpty($ce, 'Invalid Modelset: '.$modelSet.' class '.$class->getClassName().': '.implode("\n", $ce));
76 76
         }
77 77
     }
78 78
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/QueryDqlFunctionTest.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function testAggregateSum()
26 26
     {
27 27
         $salarySum = $this->em->createQuery('SELECT SUM(m.salary) AS salary FROM Doctrine\Tests\Models\Company\CompanyManager m')
28
-                               ->getSingleResult();
28
+                                ->getSingleResult();
29 29
 
30 30
         self::assertEquals(1500000, $salarySum['salary']);
31 31
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function testAggregateAvg()
34 34
     {
35 35
         $salaryAvg = $this->em->createQuery('SELECT AVG(m.salary) AS salary FROM Doctrine\Tests\Models\Company\CompanyManager m')
36
-                               ->getSingleResult();
36
+                                ->getSingleResult();
37 37
 
38 38
         self::assertEquals(375000, round($salaryAvg['salary'], 0));
39 39
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function testAggregateMin()
42 42
     {
43 43
         $salary = $this->em->createQuery('SELECT MIN(m.salary) AS salary FROM Doctrine\Tests\Models\Company\CompanyManager m')
44
-                               ->getSingleResult();
44
+                                ->getSingleResult();
45 45
 
46 46
         self::assertEquals(100000, $salary['salary']);
47 47
     }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function testAggregateMax()
50 50
     {
51 51
         $salary = $this->em->createQuery('SELECT MAX(m.salary) AS salary FROM Doctrine\Tests\Models\Company\CompanyManager m')
52
-                               ->getSingleResult();
52
+                                ->getSingleResult();
53 53
 
54 54
         self::assertEquals(800000, $salary['salary']);
55 55
     }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     public function testAggregateCount()
58 58
     {
59 59
         $managerCount = $this->em->createQuery('SELECT COUNT(m.id) AS managers FROM Doctrine\Tests\Models\Company\CompanyManager m')
60
-                               ->getSingleResult();
60
+                                ->getSingleResult();
61 61
 
62 62
         self::assertEquals(4, $managerCount['managers']);
63 63
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     public function testFunctionAbs()
66 66
     {
67 67
         $result = $this->em->createQuery('SELECT m, ABS(m.salary * -1) AS abs FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC')
68
-                         ->getResult();
68
+                            ->getResult();
69 69
 
70 70
         self::assertCount(4, $result);
71 71
         self::assertEquals(100000, $result[0]['abs']);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public function testFunctionConcat()
78 78
     {
79 79
         $arg = $this->em->createQuery('SELECT m, CONCAT(m.name, m.department) AS namedep FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC')
80
-                         ->getArrayResult();
80
+                            ->getArrayResult();
81 81
 
82 82
         self::assertCount(4, $arg);
83 83
         self::assertEquals('Roman B.IT', $arg[0]['namedep']);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     public function testFunctionLength()
90 90
     {
91 91
         $result = $this->em->createQuery('SELECT m, LENGTH(CONCAT(m.name, m.department)) AS namedeplength FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC')
92
-                         ->getArrayResult();
92
+                            ->getArrayResult();
93 93
 
94 94
         self::assertCount(4, $result);
95 95
         self::assertEquals(10, $result[0]['namedeplength']);
@@ -101,10 +101,10 @@  discard block
 block discarded – undo
101 101
     public function testFunctionLocate()
102 102
     {
103 103
         $dql = "SELECT m, LOCATE('e', LOWER(m.name)) AS loc, LOCATE('e', LOWER(m.name), 7) AS loc2 " .
104
-               "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC";
104
+                "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC";
105 105
 
106 106
         $result = $this->em->createQuery($dql)
107
-                         ->getArrayResult();
107
+                            ->getArrayResult();
108 108
 
109 109
         self::assertCount(4, $result);
110 110
         self::assertEquals(0, $result[0]['loc']);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     public function testFunctionLower()
121 121
     {
122 122
         $result = $this->em->createQuery("SELECT m, LOWER(m.name) AS lowername FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC")
123
-                         ->getArrayResult();
123
+                            ->getArrayResult();
124 124
 
125 125
         self::assertCount(4, $result);
126 126
         self::assertEquals('roman b.', $result[0]['lowername']);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     public function testFunctionMod()
133 133
     {
134 134
         $result = $this->em->createQuery("SELECT m, MOD(m.salary, 3500) AS amod FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC")
135
-                         ->getArrayResult();
135
+                            ->getArrayResult();
136 136
 
137 137
         self::assertCount(4, $result);
138 138
         self::assertEquals(2000, $result[0]['amod']);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     public function testFunctionSqrt()
145 145
     {
146 146
         $result = $this->em->createQuery("SELECT m, SQRT(m.salary) AS sqrtsalary FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC")
147
-                         ->getArrayResult();
147
+                            ->getArrayResult();
148 148
 
149 149
         self::assertCount(4, $result);
150 150
         self::assertEquals(316, round($result[0]['sqrtsalary']));
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public function testFunctionUpper()
157 157
     {
158 158
         $result = $this->em->createQuery("SELECT m, UPPER(m.name) AS uppername FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC")
159
-                         ->getArrayResult();
159
+                            ->getArrayResult();
160 160
 
161 161
         self::assertCount(4, $result);
162 162
         self::assertEquals('ROMAN B.', $result[0]['uppername']);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                 "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.name";
172 172
 
173 173
         $result = $this->em->createQuery($dql)
174
-                         ->getArrayResult();
174
+                            ->getArrayResult();
175 175
 
176 176
         self::assertCount(4, $result);
177 177
         self::assertEquals('Ben', $result[0]['str1']);
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
     public function testFunctionTrim()
189 189
     {
190 190
         $dql = "SELECT m, TRIM(TRAILING '.' FROM m.name) AS str1, " .
191
-               " TRIM(LEADING '.' FROM m.name) AS str2, TRIM(CONCAT(' ', CONCAT(m.name, ' '))) AS str3 " .
192
-               "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC";
191
+                " TRIM(LEADING '.' FROM m.name) AS str2, TRIM(CONCAT(' ', CONCAT(m.name, ' '))) AS str3 " .
192
+                "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC";
193 193
 
194 194
         $result = $this->em->createQuery($dql)->getArrayResult();
195 195
 
@@ -330,8 +330,8 @@  discard block
 block discarded – undo
330 330
         );
331 331
 
332 332
         $result = $this->em->createQuery($query)
333
-                           ->setMaxResults(1)
334
-                           ->getSingleResult(AbstractQuery::HYDRATE_ARRAY);
333
+                            ->setMaxResults(1)
334
+                            ->getSingleResult(AbstractQuery::HYDRATE_ARRAY);
335 335
 
336 336
         self::assertArrayHasKey('now', $result);
337 337
         self::assertArrayHasKey('sub', $result);
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Functional;
6 6
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
     public function testFunctionLocate()
102 102
     {
103
-        $dql = "SELECT m, LOCATE('e', LOWER(m.name)) AS loc, LOCATE('e', LOWER(m.name), 7) AS loc2 " .
103
+        $dql = "SELECT m, LOCATE('e', LOWER(m.name)) AS loc, LOCATE('e', LOWER(m.name), 7) AS loc2 ".
104 104
                "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC";
105 105
 
106 106
         $result = $this->em->createQuery($dql)
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
     public function testFunctionSubstring()
169 169
     {
170
-        $dql = 'SELECT m, SUBSTRING(m.name, 1, 3) AS str1, SUBSTRING(m.name, 5) AS str2 ' .
170
+        $dql = 'SELECT m, SUBSTRING(m.name, 1, 3) AS str1, SUBSTRING(m.name, 5) AS str2 '.
171 171
                 "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.name";
172 172
 
173 173
         $result = $this->em->createQuery($dql)
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
 
188 188
     public function testFunctionTrim()
189 189
     {
190
-        $dql = "SELECT m, TRIM(TRAILING '.' FROM m.name) AS str1, " .
191
-               " TRIM(LEADING '.' FROM m.name) AS str2, TRIM(CONCAT(' ', CONCAT(m.name, ' '))) AS str3 " .
190
+        $dql = "SELECT m, TRIM(TRAILING '.' FROM m.name) AS str1, ".
191
+               " TRIM(LEADING '.' FROM m.name) AS str2, TRIM(CONCAT(' ', CONCAT(m.name, ' '))) AS str3 ".
192 192
                "FROM Doctrine\Tests\Models\Company\CompanyManager m ORDER BY m.salary ASC";
193 193
 
194 194
         $result = $this->em->createQuery($dql)->getArrayResult();
@@ -360,12 +360,12 @@  discard block
 block discarded – undo
360 360
      */
361 361
     public function testBitOrComparison()
362 362
     {
363
-        $dql    = 'SELECT m, ' .
364
-                    'BIT_OR(4, 2) AS bit_or,' .
365
-                    'BIT_OR( (m.salary/100000) , 2 ) AS salary_bit_or ' .
366
-                    'FROM Doctrine\Tests\Models\Company\CompanyManager m ' .
367
-                'ORDER BY ' .
368
-                    'm.id ' ;
363
+        $dql = 'SELECT m, '.
364
+                    'BIT_OR(4, 2) AS bit_or,'.
365
+                    'BIT_OR( (m.salary/100000) , 2 ) AS salary_bit_or '.
366
+                    'FROM Doctrine\Tests\Models\Company\CompanyManager m '.
367
+                'ORDER BY '.
368
+                    'm.id ';
369 369
         $result = $this->em->createQuery($dql)->getArrayResult();
370 370
 
371 371
         self::assertEquals(4 | 2, $result[0]['bit_or']);
@@ -373,10 +373,10 @@  discard block
 block discarded – undo
373 373
         self::assertEquals(4 | 2, $result[2]['bit_or']);
374 374
         self::assertEquals(4 | 2, $result[3]['bit_or']);
375 375
 
376
-        self::assertEquals(($result[0][0]['salary']/100000) | 2, $result[0]['salary_bit_or']);
377
-        self::assertEquals(($result[1][0]['salary']/100000) | 2, $result[1]['salary_bit_or']);
378
-        self::assertEquals(($result[2][0]['salary']/100000) | 2, $result[2]['salary_bit_or']);
379
-        self::assertEquals(($result[3][0]['salary']/100000) | 2, $result[3]['salary_bit_or']);
376
+        self::assertEquals(($result[0][0]['salary'] / 100000) | 2, $result[0]['salary_bit_or']);
377
+        self::assertEquals(($result[1][0]['salary'] / 100000) | 2, $result[1]['salary_bit_or']);
378
+        self::assertEquals(($result[2][0]['salary'] / 100000) | 2, $result[2]['salary_bit_or']);
379
+        self::assertEquals(($result[3][0]['salary'] / 100000) | 2, $result[3]['salary_bit_or']);
380 380
     }
381 381
 
382 382
     /**
@@ -384,12 +384,12 @@  discard block
 block discarded – undo
384 384
      */
385 385
     public function testBitAndComparison()
386 386
     {
387
-        $dql    = 'SELECT m, ' .
388
-                    'BIT_AND(4, 2) AS bit_and,' .
389
-                    'BIT_AND( (m.salary/100000) , 2 ) AS salary_bit_and ' .
390
-                    'FROM Doctrine\Tests\Models\Company\CompanyManager m ' .
391
-                'ORDER BY ' .
392
-                    'm.id ' ;
387
+        $dql = 'SELECT m, '.
388
+                    'BIT_AND(4, 2) AS bit_and,'.
389
+                    'BIT_AND( (m.salary/100000) , 2 ) AS salary_bit_and '.
390
+                    'FROM Doctrine\Tests\Models\Company\CompanyManager m '.
391
+                'ORDER BY '.
392
+                    'm.id ';
393 393
         $result = $this->em->createQuery($dql)->getArrayResult();
394 394
 
395 395
         self::assertEquals(4 & 2, $result[0]['bit_and']);
@@ -397,10 +397,10 @@  discard block
 block discarded – undo
397 397
         self::assertEquals(4 & 2, $result[2]['bit_and']);
398 398
         self::assertEquals(4 & 2, $result[3]['bit_and']);
399 399
 
400
-        self::assertEquals(($result[0][0]['salary']/100000) & 2, $result[0]['salary_bit_and']);
401
-        self::assertEquals(($result[1][0]['salary']/100000) & 2, $result[1]['salary_bit_and']);
402
-        self::assertEquals(($result[2][0]['salary']/100000) & 2, $result[2]['salary_bit_and']);
403
-        self::assertEquals(($result[3][0]['salary']/100000) & 2, $result[3]['salary_bit_and']);
400
+        self::assertEquals(($result[0][0]['salary'] / 100000) & 2, $result[0]['salary_bit_and']);
401
+        self::assertEquals(($result[1][0]['salary'] / 100000) & 2, $result[1]['salary_bit_and']);
402
+        self::assertEquals(($result[2][0]['salary'] / 100000) & 2, $result[2]['salary_bit_and']);
403
+        self::assertEquals(($result[3][0]['salary'] / 100000) & 2, $result[3]['salary_bit_and']);
404 404
     }
405 405
 
406 406
     protected function generateFixture()
Please login to merge, or discard this patch.