@@ -1024,7 +1024,7 @@ discard block |
||
| 1024 | 1024 | ]; |
| 1025 | 1025 | |
| 1026 | 1026 | $proxyInstance = (new LazyLoadingGhostFactory(new Configuration())) |
| 1027 | - ->createProxy(ECommerceShipping::class, static function () { |
|
| 1027 | + ->createProxy(ECommerceShipping::class, static function() { |
|
| 1028 | 1028 | self::fail('Proxy is not supposed to be lazy-loaded'); |
| 1029 | 1029 | }); |
| 1030 | 1030 | |
@@ -1075,7 +1075,7 @@ discard block |
||
| 1075 | 1075 | ]; |
| 1076 | 1076 | |
| 1077 | 1077 | $proxyInstance = (new LazyLoadingGhostFactory(new Configuration())) |
| 1078 | - ->createProxy(ECommerceShipping::class, static function () { |
|
| 1078 | + ->createProxy(ECommerceShipping::class, static function() { |
|
| 1079 | 1079 | self::fail('Proxy is not supposed to be lazy-loaded'); |
| 1080 | 1080 | }); |
| 1081 | 1081 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | protected function loadDriver() |
| 30 | 30 | { |
| 31 | - return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml'); |
|
| 31 | + return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml'); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function testClassTableInheritanceDiscriminatorMap() : void |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function testValidateXmlSchema($xmlMappingFile) : void |
| 174 | 174 | { |
| 175 | - $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd'; |
|
| 175 | + $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd'; |
|
| 176 | 176 | $dom = new DOMDocument(); |
| 177 | 177 | |
| 178 | 178 | $dom->load($xmlMappingFile); |
@@ -182,14 +182,14 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | public static function dataValidSchema() |
| 184 | 184 | { |
| 185 | - $list = glob(__DIR__ . '/xml/*.xml'); |
|
| 185 | + $list = glob(__DIR__.'/xml/*.xml'); |
|
| 186 | 186 | $invalid = ['Doctrine.Tests.Models.DDC889.DDC889Class.dcm']; |
| 187 | 187 | |
| 188 | - $list = array_filter($list, static function ($item) use ($invalid) { |
|
| 188 | + $list = array_filter($list, static function($item) use ($invalid) { |
|
| 189 | 189 | return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid, true); |
| 190 | 190 | }); |
| 191 | 191 | |
| 192 | - return array_map(static function ($item) { |
|
| 192 | + return array_map(static function($item) { |
|
| 193 | 193 | return [$item]; |
| 194 | 194 | }, $list); |
| 195 | 195 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $query->free(); |
| 67 | 67 | } catch (Exception $e) { |
| 68 | - $this->fail($e->getMessage() . "\n" . $e->getTraceAsString()); |
|
| 68 | + $this->fail($e->getMessage()."\n".$e->getTraceAsString()); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -1625,7 +1625,7 @@ discard block |
||
| 1625 | 1625 | public function testAliasDoesNotExceedPlatformDefinedLength() : void |
| 1626 | 1626 | { |
| 1627 | 1627 | $this->assertSqlGeneration( |
| 1628 | - 'SELECT m FROM ' . __NAMESPACE__ . '\\DDC1384Model m', |
|
| 1628 | + 'SELECT m FROM '.__NAMESPACE__.'\\DDC1384Model m', |
|
| 1629 | 1629 | 'SELECT t0."aVeryLongIdentifierThatShouldBeShortenedByTheSQLWalker_fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" AS c0 FROM "DDC1384Model" t0' |
| 1630 | 1630 | ); |
| 1631 | 1631 | } |
@@ -1658,12 +1658,12 @@ discard block |
||
| 1658 | 1658 | public function testSelectWithArithmeticExpressionBeforeField() : void |
| 1659 | 1659 | { |
| 1660 | 1660 | $this->assertSqlGeneration( |
| 1661 | - 'SELECT - e.value AS value, e.id FROM ' . __NAMESPACE__ . '\DDC1474Entity e', |
|
| 1661 | + 'SELECT - e.value AS value, e.id FROM '.__NAMESPACE__.'\DDC1474Entity e', |
|
| 1662 | 1662 | 'SELECT -t0."value" AS c0, t0."id" AS c1 FROM "DDC1474Entity" t0' |
| 1663 | 1663 | ); |
| 1664 | 1664 | |
| 1665 | 1665 | $this->assertSqlGeneration( |
| 1666 | - 'SELECT e.id, + e.value AS value FROM ' . __NAMESPACE__ . '\DDC1474Entity e', |
|
| 1666 | + 'SELECT e.id, + e.value AS value FROM '.__NAMESPACE__.'\DDC1474Entity e', |
|
| 1667 | 1667 | 'SELECT t0."id" AS c0, +t0."value" AS c1 FROM "DDC1474Entity" t0' |
| 1668 | 1668 | ); |
| 1669 | 1669 | } |
@@ -2340,8 +2340,8 @@ discard block |
||
| 2340 | 2340 | public function testHavingRegressionUsingVariableWithMathOperatorsExpression($operator) : void |
| 2341 | 2341 | { |
| 2342 | 2342 | $this->assertSqlGeneration( |
| 2343 | - 'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 ' . $operator . ' countName > 0', |
|
| 2344 | - 'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 ' . $operator . ' c0 > 0' |
|
| 2343 | + 'SELECT COUNT(u.name) AS countName FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING 1 '.$operator.' countName > 0', |
|
| 2344 | + 'SELECT COUNT(t0."name") AS c0 FROM "cms_users" t0 HAVING 1 '.$operator.' c0 > 0' |
|
| 2345 | 2345 | ); |
| 2346 | 2346 | } |
| 2347 | 2347 | |
@@ -2360,7 +2360,7 @@ discard block |
||
| 2360 | 2360 | |
| 2361 | 2361 | public function getSql(SqlWalker $sqlWalker) |
| 2362 | 2362 | { |
| 2363 | - return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression) . ')'; |
|
| 2363 | + return 'ABS('.$sqlWalker->walkSimpleArithmeticExpression($this->simpleArithmeticExpression).')'; |
|
| 2364 | 2364 | } |
| 2365 | 2365 | |
| 2366 | 2366 | public function parse(Parser $parser) |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | try { |
| 46 | 46 | $sqlGenerated = $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker); |
| 47 | 47 | } catch (Exception $e) { |
| 48 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
| 48 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | $condExpr = $whereClause->conditionalExpression; |
| 146 | 146 | |
| 147 | 147 | // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression |
| 148 | - if (! ($condExpr instanceof Query\AST\ConditionalExpression)) { |
|
| 148 | + if ( ! ($condExpr instanceof Query\AST\ConditionalExpression)) { |
|
| 149 | 149 | $condExpr = new Query\AST\ConditionalExpression([$condExpr]); |
| 150 | 150 | |
| 151 | 151 | $whereClause->conditionalExpression = $condExpr; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $singleTerm = $selectStatement->whereClause->conditionalExpression->conditionalTerms[0]; |
| 169 | 169 | |
| 170 | 170 | // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression |
| 171 | - if (! ($singleTerm instanceof Query\AST\ConditionalTerm)) { |
|
| 171 | + if ( ! ($singleTerm instanceof Query\AST\ConditionalTerm)) { |
|
| 172 | 172 | $singleTerm = new Query\AST\ConditionalTerm([$singleTerm]); |
| 173 | 173 | |
| 174 | 174 | $selectStatement->whereClause->conditionalExpression->conditionalTerms[0] = $singleTerm; |
@@ -206,9 +206,9 @@ discard block |
||
| 206 | 206 | { |
| 207 | 207 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
| 208 | 208 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
| 209 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
| 209 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
| 210 | 210 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
| 211 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
| 211 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
| 212 | 212 | |
| 213 | 213 | $identificationVariableDecl->joins[] = $join; |
| 214 | 214 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
| 219 | 219 | |
| 220 | 220 | $this->setQueryComponent( |
| 221 | - $rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
| 221 | + $rangeVariableDecl->aliasIdentificationVariable.'a', |
|
| 222 | 222 | [ |
| 223 | 223 | 'metadata' => $addressMetadata, |
| 224 | 224 | 'parent' => $rangeVariableDecl->aliasIdentificationVariable, |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | $query->free(); |
| 37 | 37 | } catch (Exception $e) { |
| 38 | - $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine()); |
|
| 38 | + $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine()); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | self::assertEquals($sqlToBeConfirmed, $sqlGenerated); |
@@ -77,9 +77,9 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | $rangeVariableDecl = $identificationVariableDecl->rangeVariableDeclaration; |
| 79 | 79 | $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address'); |
| 80 | - $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null); |
|
| 80 | + $joinAssocDeclaration = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null); |
|
| 81 | 81 | $join = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration); |
| 82 | - $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false); |
|
| 82 | + $selectExpression = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false); |
|
| 83 | 83 | |
| 84 | 84 | $identificationVariableDecl->joins[] = $join; |
| 85 | 85 | $selectStatement->selectClause->selectExpressions[] = $selectExpression; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class); |
| 90 | 90 | |
| 91 | 91 | $this->setQueryComponent( |
| 92 | - $rangeVariableDecl->aliasIdentificationVariable . 'a', |
|
| 92 | + $rangeVariableDecl->aliasIdentificationVariable.'a', |
|
| 93 | 93 | [ |
| 94 | 94 | 'metadata' => $addressMetadata, |
| 95 | 95 | 'parent' => $rangeVariableDecl->aliasIdentificationVariable, |
@@ -19,16 +19,16 @@ |
||
| 19 | 19 | public function providerParameterTypeInferer() |
| 20 | 20 | { |
| 21 | 21 | $data = [ |
| 22 | - [1, Type::INTEGER], |
|
| 23 | - ['bar', ParameterType::STRING], |
|
| 24 | - ['1', ParameterType::STRING], |
|
| 25 | - [new DateTime(), Type::DATETIME], |
|
| 22 | + [1, Type::INTEGER], |
|
| 23 | + ['bar', ParameterType::STRING], |
|
| 24 | + ['1', ParameterType::STRING], |
|
| 25 | + [new DateTime(), Type::DATETIME], |
|
| 26 | 26 | [new DateInterval('P1D'), Type::DATEINTERVAL], |
| 27 | - [[2], Connection::PARAM_INT_ARRAY], |
|
| 28 | - [['foo'], Connection::PARAM_STR_ARRAY], |
|
| 29 | - [['1','2'], Connection::PARAM_STR_ARRAY], |
|
| 30 | - [[], Connection::PARAM_STR_ARRAY], |
|
| 31 | - [true, Type::BOOLEAN], |
|
| 27 | + [[2], Connection::PARAM_INT_ARRAY], |
|
| 28 | + [['foo'], Connection::PARAM_STR_ARRAY], |
|
| 29 | + [['1', '2'], Connection::PARAM_STR_ARRAY], |
|
| 30 | + [[], Connection::PARAM_STR_ARRAY], |
|
| 31 | + [true, Type::BOOLEAN], |
|
| 32 | 32 | ]; |
| 33 | 33 | |
| 34 | 34 | if (PHP_VERSION_ID >= 50500) { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | public function testThrowsExceptionOnNonObjectValues($methodName) : void |
| 142 | 142 | { |
| 143 | 143 | $this->expectException(ORMInvalidArgumentException::class); |
| 144 | - $this->expectExceptionMessage('EntityManager#' . $methodName . '() expects parameter 1 to be an entity object, NULL given.'); |
|
| 144 | + $this->expectExceptionMessage('EntityManager#'.$methodName.'() expects parameter 1 to be an entity object, NULL given.'); |
|
| 145 | 145 | |
| 146 | 146 | $this->em->{$methodName}(null); |
| 147 | 147 | } |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | { |
| 187 | 187 | self::assertSame( |
| 188 | 188 | $value, |
| 189 | - $this->em->transactional(static function ($em) use ($value) { |
|
| 189 | + $this->em->transactional(static function($em) use ($value) { |
|
| 190 | 190 | return $value; |
| 191 | 191 | }) |
| 192 | 192 | ); |
@@ -219,8 +219,8 @@ discard block |
||
| 219 | 219 | public function testTransactionalReThrowsThrowables() : void |
| 220 | 220 | { |
| 221 | 221 | try { |
| 222 | - $this->em->transactional(static function () { |
|
| 223 | - (static function (array $value) { |
|
| 222 | + $this->em->transactional(static function() { |
|
| 223 | + (static function(array $value) { |
|
| 224 | 224 | // this only serves as an IIFE that throws a `TypeError` |
| 225 | 225 | })(null); |
| 226 | 226 | }); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | protected function createRegion() |
| 61 | 61 | { |
| 62 | - $this->directory = sys_get_temp_dir() . '/doctrine_lock_' . uniqid(); |
|
| 62 | + $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid(); |
|
| 63 | 63 | |
| 64 | 64 | $region = new DefaultRegion('concurren_region_test', $this->cache); |
| 65 | 65 | |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | $reflectionDirectory->setAccessible(true); |
| 263 | 263 | $reflectionDirectory->setValue($region, str_repeat('a', 10000)); |
| 264 | 264 | |
| 265 | - set_error_handler(static function () { |
|
| 265 | + set_error_handler(static function() { |
|
| 266 | 266 | }, E_WARNING); |
| 267 | 267 | self::assertTrue($region->evictAll()); |
| 268 | 268 | restore_error_handler(); |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | { |
| 276 | 276 | $path = $path ?: $this->directory; |
| 277 | 277 | |
| 278 | - if (! is_dir($path)) { |
|
| 278 | + if ( ! is_dir($path)) { |
|
| 279 | 279 | return; |
| 280 | 280 | } |
| 281 | 281 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | ->expects(self::once()) |
| 174 | 174 | ->method('loadCollection') |
| 175 | 175 | ->with($this->collection) |
| 176 | - ->willReturnCallback(static function (PersistentCollection $persistentCollection) use ($persistedElement) : void { |
|
| 176 | + ->willReturnCallback(static function(PersistentCollection $persistentCollection) use ($persistedElement) : void { |
|
| 177 | 177 | $persistentCollection->unwrap()->add($persistedElement); |
| 178 | 178 | }); |
| 179 | 179 | |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | ->expects(self::once()) |
| 211 | 211 | ->method('loadCollection') |
| 212 | 212 | ->with($this->collection) |
| 213 | - ->willReturnCallback(static function (PersistentCollection $persistentCollection) use ( |
|
| 213 | + ->willReturnCallback(static function(PersistentCollection $persistentCollection) use ( |
|
| 214 | 214 | $persistedElement, |
| 215 | 215 | $newElementThatIsAlsoPersisted |
| 216 | 216 | ) : void { |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | ->expects(self::once()) |
| 253 | 253 | ->method('loadCollection') |
| 254 | 254 | ->with($this->collection) |
| 255 | - ->willReturnCallback(static function (PersistentCollection $persistentCollection) use ( |
|
| 255 | + ->willReturnCallback(static function(PersistentCollection $persistentCollection) use ( |
|
| 256 | 256 | $persistedElement, |
| 257 | 257 | $newElementThatIsAlsoPersisted |
| 258 | 258 | ) : void { |