@@ -25,7 +25,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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::assertEquals(4, count($result)); |
| 71 | 71 | self::assertEquals(100000, $result[0]['abs']); |
@@ -77,7 +77,7 @@ discard block |
||
| 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::assertEquals(4, count($arg)); |
| 83 | 83 | self::assertEquals('Roman B.IT', $arg[0]['namedep']); |
@@ -89,7 +89,7 @@ discard block |
||
| 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::assertEquals(4, count($result)); |
| 95 | 95 | self::assertEquals(10, $result[0]['namedeplength']); |
@@ -101,10 +101,10 @@ discard block |
||
| 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::assertEquals(4, count($result)); |
| 110 | 110 | self::assertEquals(0, $result[0]['loc']); |
@@ -120,7 +120,7 @@ discard block |
||
| 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::assertEquals(4, count($result)); |
| 126 | 126 | self::assertEquals('roman b.', $result[0]['lowername']); |
@@ -132,7 +132,7 @@ discard block |
||
| 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::assertEquals(4, count($result)); |
| 138 | 138 | self::assertEquals(2000, $result[0]['amod']); |
@@ -144,7 +144,7 @@ discard block |
||
| 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::assertEquals(4, count($result)); |
| 150 | 150 | self::assertEquals(316, round($result[0]['sqrtsalary'])); |
@@ -156,7 +156,7 @@ discard block |
||
| 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::assertEquals(4, count($result)); |
| 162 | 162 | self::assertEquals('ROMAN B.', $result[0]['uppername']); |
@@ -171,7 +171,7 @@ discard block |
||
| 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::assertEquals(4, count($result)); |
| 177 | 177 | self::assertEquals('Ben', $result[0]['str1']); |
@@ -188,8 +188,8 @@ discard block |
||
| 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 | |
@@ -361,8 +361,8 @@ discard block |
||
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | /** |
| 364 | - * @group DDC-1213 |
|
| 365 | - */ |
|
| 364 | + * @group DDC-1213 |
|
| 365 | + */ |
|
| 366 | 366 | public function testBitAndComparison() |
| 367 | 367 | { |
| 368 | 368 | $dql = 'SELECT m, ' . |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | self::assertEquals(4, count($result)); |
| 150 | 150 | self::assertEquals(316, round($result[0]['sqrtsalary'])); |
| 151 | - self::assertEquals(447, round($result[1]['sqrtsalary'])); |
|
| 151 | + self::assertEquals(447, round($result[1]['sqrtsalary'])); |
|
| 152 | 152 | self::assertEquals(632, round($result[2]['sqrtsalary'])); |
| 153 | 153 | self::assertEquals(894, round($result[3]['sqrtsalary'])); |
| 154 | 154 | } |
@@ -341,12 +341,12 @@ discard block |
||
| 341 | 341 | */ |
| 342 | 342 | public function testBitOrComparison() |
| 343 | 343 | { |
| 344 | - $dql = 'SELECT m, ' . |
|
| 345 | - 'BIT_OR(4, 2) AS bit_or,' . |
|
| 346 | - 'BIT_OR( (m.salary/100000) , 2 ) AS salary_bit_or ' . |
|
| 347 | - 'FROM Doctrine\Tests\Models\Company\CompanyManager m ' . |
|
| 348 | - 'ORDER BY ' . |
|
| 349 | - 'm.id ' ; |
|
| 344 | + $dql = 'SELECT m, '. |
|
| 345 | + 'BIT_OR(4, 2) AS bit_or,'. |
|
| 346 | + 'BIT_OR( (m.salary/100000) , 2 ) AS salary_bit_or '. |
|
| 347 | + 'FROM Doctrine\Tests\Models\Company\CompanyManager m '. |
|
| 348 | + 'ORDER BY '. |
|
| 349 | + 'm.id '; |
|
| 350 | 350 | $result = $this->em->createQuery($dql)->getArrayResult(); |
| 351 | 351 | |
| 352 | 352 | self::assertEquals(4 | 2, $result[0]['bit_or']); |
@@ -354,10 +354,10 @@ discard block |
||
| 354 | 354 | self::assertEquals(4 | 2, $result[2]['bit_or']); |
| 355 | 355 | self::assertEquals(4 | 2, $result[3]['bit_or']); |
| 356 | 356 | |
| 357 | - self::assertEquals(($result[0][0]['salary']/100000) | 2, $result[0]['salary_bit_or']); |
|
| 358 | - self::assertEquals(($result[1][0]['salary']/100000) | 2, $result[1]['salary_bit_or']); |
|
| 359 | - self::assertEquals(($result[2][0]['salary']/100000) | 2, $result[2]['salary_bit_or']); |
|
| 360 | - self::assertEquals(($result[3][0]['salary']/100000) | 2, $result[3]['salary_bit_or']); |
|
| 357 | + self::assertEquals(($result[0][0]['salary'] / 100000) | 2, $result[0]['salary_bit_or']); |
|
| 358 | + self::assertEquals(($result[1][0]['salary'] / 100000) | 2, $result[1]['salary_bit_or']); |
|
| 359 | + self::assertEquals(($result[2][0]['salary'] / 100000) | 2, $result[2]['salary_bit_or']); |
|
| 360 | + self::assertEquals(($result[3][0]['salary'] / 100000) | 2, $result[3]['salary_bit_or']); |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | /** |
@@ -365,12 +365,12 @@ discard block |
||
| 365 | 365 | */ |
| 366 | 366 | public function testBitAndComparison() |
| 367 | 367 | { |
| 368 | - $dql = 'SELECT m, ' . |
|
| 369 | - 'BIT_AND(4, 2) AS bit_and,' . |
|
| 370 | - 'BIT_AND( (m.salary/100000) , 2 ) AS salary_bit_and ' . |
|
| 371 | - 'FROM Doctrine\Tests\Models\Company\CompanyManager m ' . |
|
| 372 | - 'ORDER BY ' . |
|
| 373 | - 'm.id ' ; |
|
| 368 | + $dql = 'SELECT m, '. |
|
| 369 | + 'BIT_AND(4, 2) AS bit_and,'. |
|
| 370 | + 'BIT_AND( (m.salary/100000) , 2 ) AS salary_bit_and '. |
|
| 371 | + 'FROM Doctrine\Tests\Models\Company\CompanyManager m '. |
|
| 372 | + 'ORDER BY '. |
|
| 373 | + 'm.id '; |
|
| 374 | 374 | $result = $this->em->createQuery($dql)->getArrayResult(); |
| 375 | 375 | |
| 376 | 376 | self::assertEquals(4 & 2, $result[0]['bit_and']); |
@@ -378,10 +378,10 @@ discard block |
||
| 378 | 378 | self::assertEquals(4 & 2, $result[2]['bit_and']); |
| 379 | 379 | self::assertEquals(4 & 2, $result[3]['bit_and']); |
| 380 | 380 | |
| 381 | - self::assertEquals(($result[0][0]['salary']/100000) & 2, $result[0]['salary_bit_and']); |
|
| 382 | - self::assertEquals(($result[1][0]['salary']/100000) & 2, $result[1]['salary_bit_and']); |
|
| 383 | - self::assertEquals(($result[2][0]['salary']/100000) & 2, $result[2]['salary_bit_and']); |
|
| 384 | - self::assertEquals(($result[3][0]['salary']/100000) & 2, $result[3]['salary_bit_and']); |
|
| 381 | + self::assertEquals(($result[0][0]['salary'] / 100000) & 2, $result[0]['salary_bit_and']); |
|
| 382 | + self::assertEquals(($result[1][0]['salary'] / 100000) & 2, $result[1]['salary_bit_and']); |
|
| 383 | + self::assertEquals(($result[2][0]['salary'] / 100000) & 2, $result[2]['salary_bit_and']); |
|
| 384 | + self::assertEquals(($result[3][0]['salary'] / 100000) & 2, $result[3]['salary_bit_and']); |
|
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | protected function generateFixture() |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | { |
| 185 | 185 | $this->createFixture(); |
| 186 | 186 | |
| 187 | - $product = $this->em->find(ECommerceProduct::class, $this->product->getId()); |
|
| 187 | + $product = $this->em->find(ECommerceProduct::class, $this->product->getId()); |
|
| 188 | 188 | |
| 189 | 189 | $thirdFeature = new ECommerceFeature(); |
| 190 | 190 | $thirdFeature->setDescription('Model writing tutorial'); |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -155,10 +155,10 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | private $ownerO; |
| 157 | 157 | |
| 158 | - public function __construct(CascadeRemoveOrderEntityO $eO, $position=1) |
|
| 158 | + public function __construct(CascadeRemoveOrderEntityO $eO, $position = 1) |
|
| 159 | 159 | { |
| 160 | 160 | $this->position = $position; |
| 161 | - $this->ownerO= $eO; |
|
| 161 | + $this->ownerO = $eO; |
|
| 162 | 162 | $this->ownerO->addOneToManyG($this); |
| 163 | 163 | } |
| 164 | 164 | |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | |
| 397 | 397 | $l1 = new Login('session1'); |
| 398 | 398 | $l2 = new Login('session2'); |
| 399 | - $token = new Token('token-hash'); |
|
| 399 | + $token = new Token('token-hash'); |
|
| 400 | 400 | $token->addLogin($l1); |
| 401 | 401 | $token->addLogin($l2); |
| 402 | 402 | |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function testIssue2059() |
| 33 | 33 | { |
| 34 | - if (!$this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 34 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 35 | 35 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | public function testLoadMetadataFromDatabase() |
| 55 | 55 | { |
| 56 | - if (!$this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 56 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 57 | 57 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 58 | 58 | } |
| 59 | 59 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | public function testLoadMetadataWithForeignKeyFromDatabase() |
| 93 | 93 | { |
| 94 | - if (!$this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 94 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 95 | 95 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 96 | 96 | } |
| 97 | 97 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | public function testDetectManyToManyTables() |
| 126 | 126 | { |
| 127 | - if (!$this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 127 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
| 128 | 128 | $this->markTestSkipped('Platform does not support foreign keys.'); |
| 129 | 129 | } |
| 130 | 130 | |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | |
| 180 | 180 | $table->addColumn('column_index1', 'string'); |
| 181 | 181 | $table->addColumn('column_index2', 'string'); |
| 182 | - $table->addIndex(['column_index1','column_index2'], 'index1'); |
|
| 182 | + $table->addIndex(['column_index1', 'column_index2'], 'index1'); |
|
| 183 | 183 | |
| 184 | 184 | $table->addColumn('column_unique_index1', 'string'); |
| 185 | 185 | $table->addColumn('column_unique_index2', 'string'); |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | |
| 246 | 246 | self::assertTrue( ! empty($indexes['index1']['columns'])); |
| 247 | 247 | self::assertEquals( |
| 248 | - ['column_index1','column_index2'], |
|
| 248 | + ['column_index1', 'column_index2'], |
|
| 249 | 249 | $indexes['index1']['columns'] |
| 250 | 250 | ); |
| 251 | 251 | |
@@ -268,8 +268,8 @@ |
||
| 268 | 268 | $this->em->clear(); |
| 269 | 269 | |
| 270 | 270 | $newUser = $this->em->createQuery('SELECT u, g FROM Doctrine\Tests\Models\CMS\CmsUser u LEFT JOIN u.groups g WHERE u.id = ?1') |
| 271 | - ->setParameter(1, $user->getId()) |
|
| 272 | - ->getSingleResult(); |
|
| 271 | + ->setParameter(1, $user->getId()) |
|
| 272 | + ->getSingleResult(); |
|
| 273 | 273 | self::assertEquals(0, count($newUser->groups)); |
| 274 | 274 | self::assertInstanceOf(ManyToManyAssociationMetadata::class, $newUser->groups->getMapping()); |
| 275 | 275 | |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -293,9 +293,9 @@ discard block |
||
| 293 | 293 | $user->username = 'gblanco'; |
| 294 | 294 | $user->status = 'developer'; |
| 295 | 295 | |
| 296 | - for ($i=0; $i < $groupCount; ++$i) { |
|
| 296 | + for ($i = 0; $i < $groupCount; ++$i) { |
|
| 297 | 297 | $group = new CmsGroup; |
| 298 | - $group->name = 'Developers_' . $i; |
|
| 298 | + $group->name = 'Developers_'.$i; |
|
| 299 | 299 | $user->addGroup($group); |
| 300 | 300 | } |
| 301 | 301 | |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | $user |
| 419 | 419 | ->getGroups() |
| 420 | 420 | ->matching($criteria) |
| 421 | - ->map(function (CmsGroup $group) { |
|
| 421 | + ->map(function(CmsGroup $group) { |
|
| 422 | 422 | return $group->getName(); |
| 423 | 423 | }) |
| 424 | 424 | ->toArray() |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | $user |
| 463 | 463 | ->getTags() |
| 464 | 464 | ->matching($criteria) |
| 465 | - ->map(function (CmsTag $tag) { |
|
| 465 | + ->map(function(CmsTag $tag) { |
|
| 466 | 466 | return $tag->getName(); |
| 467 | 467 | }) |
| 468 | 468 | ->toArray() |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\ORM\Functional\ValueConversionType; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | use Doctrine\Tests\Models\CMS\CmsUser; |
| 14 | 14 | use Doctrine\Tests\OrmFunctionalTestCase; |
| 15 | 15 | |
| 16 | -require_once __DIR__ . '/../../TestInit.php'; |
|
| 16 | +require_once __DIR__.'/../../TestInit.php'; |
|
| 17 | 17 | |
| 18 | 18 | class CustomFunctionsTest extends OrmFunctionalTestCase |
| 19 | 19 | { |
@@ -1,6 +1,6 @@ discard block |
||
| 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 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $this->em->clear(); |
| 53 | 53 | |
| 54 | - $result2 = $this->em->createQuery($dql) |
|
| 54 | + $result2 = $this->em->createQuery($dql) |
|
| 55 | 55 | ->setCacheable(true) |
| 56 | 56 | ->getResult(); |
| 57 | 57 | |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | $this->em->clear(); |
| 256 | 256 | |
| 257 | - $result2 = $this->em->createQuery($dql) |
|
| 257 | + $result2 = $this->em->createQuery($dql) |
|
| 258 | 258 | ->setCacheable(true) |
| 259 | 259 | ->getResult(); |
| 260 | 260 | |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | |
| 347 | 347 | $this->em->clear(); |
| 348 | 348 | |
| 349 | - $result2 = $this->em->createQuery($dql) |
|
| 349 | + $result2 = $this->em->createQuery($dql) |
|
| 350 | 350 | ->setCacheable(true) |
| 351 | 351 | ->getResult(); |
| 352 | 352 | |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | |
| 395 | 395 | $this->em->clear(); |
| 396 | 396 | |
| 397 | - $result2 = $this->em->createQuery($dql)->setCacheable(true) |
|
| 397 | + $result2 = $this->em->createQuery($dql)->setCacheable(true) |
|
| 398 | 398 | ->setParameter('name', $name) |
| 399 | 399 | ->getResult(); |
| 400 | 400 | |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | $result1 = $this->em->createQuery($dql)->setCacheable(true)->getResult(); |
| 423 | 423 | |
| 424 | 424 | self::assertCount(2, $result1); |
| 425 | - self::assertEquals($queryCount + 1 , $this->getCurrentQueryCount()); |
|
| 425 | + self::assertEquals($queryCount + 1, $this->getCurrentQueryCount()); |
|
| 426 | 426 | self::assertEquals($this->countries[0]->getId(), $result1[0]->getId()); |
| 427 | 427 | self::assertEquals($this->countries[1]->getId(), $result1[1]->getId()); |
| 428 | 428 | self::assertEquals($this->countries[0]->getName(), $result1[0]->getName()); |
@@ -438,11 +438,11 @@ discard block |
||
| 438 | 438 | |
| 439 | 439 | $this->em->clear(); |
| 440 | 440 | |
| 441 | - $result2 = $this->em->createQuery($dql) |
|
| 441 | + $result2 = $this->em->createQuery($dql) |
|
| 442 | 442 | ->setCacheable(true) |
| 443 | 443 | ->getResult(); |
| 444 | 444 | |
| 445 | - self::assertEquals($queryCount + 2 , $this->getCurrentQueryCount()); |
|
| 445 | + self::assertEquals($queryCount + 2, $this->getCurrentQueryCount()); |
|
| 446 | 446 | self::assertCount(2, $result2); |
| 447 | 447 | |
| 448 | 448 | self::assertEquals(5, $this->secondLevelCacheLogger->getPutCount()); |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | self::assertEquals($result1[0]->getName(), $result2[0]->getName()); |
| 460 | 460 | self::assertEquals($result1[1]->getName(), $result2[1]->getName()); |
| 461 | 461 | |
| 462 | - self::assertEquals($queryCount + 2 , $this->getCurrentQueryCount()); |
|
| 462 | + self::assertEquals($queryCount + 2, $this->getCurrentQueryCount()); |
|
| 463 | 463 | } |
| 464 | 464 | |
| 465 | 465 | public function testBasicQueryFetchJoinsOneToMany() |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | |
| 501 | 501 | $this->em->clear(); |
| 502 | 502 | |
| 503 | - $result2 = $this->em->createQuery($dql) |
|
| 503 | + $result2 = $this->em->createQuery($dql) |
|
| 504 | 504 | ->setCacheable(true) |
| 505 | 505 | ->getResult(); |
| 506 | 506 | |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | $this->em->clear(); |
| 567 | 567 | $this->secondLevelCacheLogger->clearStats(); |
| 568 | 568 | |
| 569 | - $result2 = $this->em->createQuery($dql) |
|
| 569 | + $result2 = $this->em->createQuery($dql) |
|
| 570 | 570 | ->setCacheable(true) |
| 571 | 571 | ->getResult(); |
| 572 | 572 | |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | |
| 627 | 627 | $this->cache->evictEntityRegion(State::class); |
| 628 | 628 | |
| 629 | - $result2 = $this->em->createQuery($dql) |
|
| 629 | + $result2 = $this->em->createQuery($dql) |
|
| 630 | 630 | ->setCacheable(true) |
| 631 | 631 | ->getResult(); |
| 632 | 632 | |
@@ -669,7 +669,7 @@ discard block |
||
| 669 | 669 | |
| 670 | 670 | $this->cache->evictEntityRegion(City::class); |
| 671 | 671 | |
| 672 | - $result2 = $this->em->createQuery($dql) |
|
| 672 | + $result2 = $this->em->createQuery($dql) |
|
| 673 | 673 | ->setCacheable(true) |
| 674 | 674 | ->getResult(); |
| 675 | 675 | |
@@ -720,7 +720,7 @@ discard block |
||
| 720 | 720 | |
| 721 | 721 | $this->em->clear(); |
| 722 | 722 | |
| 723 | - $result2 = $this->em->createNativeQuery($sql, $rsm) |
|
| 723 | + $result2 = $this->em->createNativeQuery($sql, $rsm) |
|
| 724 | 724 | ->setCacheable(true) |
| 725 | 725 | ->getResult(); |
| 726 | 726 | |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | |
| 776 | 776 | $this->em->clear(); |
| 777 | 777 | |
| 778 | - $result2 = $this->em->createQuery($dql) |
|
| 778 | + $result2 = $this->em->createQuery($dql) |
|
| 779 | 779 | ->setCacheable(true) |
| 780 | 780 | ->setFirstResult(2) |
| 781 | 781 | ->setMaxResults(1) |
@@ -787,7 +787,7 @@ discard block |
||
| 787 | 787 | |
| 788 | 788 | $this->em->clear(); |
| 789 | 789 | |
| 790 | - $result3 = $this->em->createQuery($dql) |
|
| 790 | + $result3 = $this->em->createQuery($dql) |
|
| 791 | 791 | ->setCacheable(true) |
| 792 | 792 | ->getResult(); |
| 793 | 793 | |
@@ -804,7 +804,7 @@ discard block |
||
| 804 | 804 | $this->secondLevelCacheLogger->clearStats(); |
| 805 | 805 | $this->em->clear(); |
| 806 | 806 | |
| 807 | - $getHash = function(AbstractQuery $query){ |
|
| 807 | + $getHash = function(AbstractQuery $query) { |
|
| 808 | 808 | $method = new \ReflectionMethod($query, 'getHash'); |
| 809 | 809 | $method->setAccessible(true); |
| 810 | 810 | |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | ->getRegion() |
| 838 | 838 | ->put($key, $entry); |
| 839 | 839 | |
| 840 | - $result2 = $this->em->createQuery($dql) |
|
| 840 | + $result2 = $this->em->createQuery($dql) |
|
| 841 | 841 | ->setCacheable(true) |
| 842 | 842 | ->setLifetime(3600) |
| 843 | 843 | ->getResult(); |