@@ -21,8 +21,8 @@ discard block |
||
| 21 | 21 | use Doctrine\ORM\Tools\Console\ConsoleRunner; |
| 22 | 22 | |
| 23 | 23 | $autoloadFiles = [ |
| 24 | - __DIR__ . '/../vendor/autoload.php', |
|
| 25 | - __DIR__ . '/../../../autoload.php' |
|
| 24 | + __DIR__.'/../vendor/autoload.php', |
|
| 25 | + __DIR__.'/../../../autoload.php' |
|
| 26 | 26 | ]; |
| 27 | 27 | |
| 28 | 28 | foreach ($autoloadFiles as $autoloadFile) { |
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -$directories = [getcwd(), getcwd() . DIRECTORY_SEPARATOR . 'config']; |
|
| 35 | +$directories = [getcwd(), getcwd().DIRECTORY_SEPARATOR.'config']; |
|
| 36 | 36 | |
| 37 | 37 | $configFile = null; |
| 38 | 38 | foreach ($directories as $directory) { |
| 39 | - $configFile = $directory . DIRECTORY_SEPARATOR . 'cli-config.php'; |
|
| 39 | + $configFile = $directory.DIRECTORY_SEPARATOR.'cli-config.php'; |
|
| 40 | 40 | |
| 41 | 41 | if (file_exists($configFile)) { |
| 42 | 42 | break; |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if ( ! is_readable($configFile)) { |
| 52 | - echo 'Configuration file [' . $configFile . '] does not have read permission.' . "\n"; |
|
| 52 | + echo 'Configuration file ['.$configFile.'] does not have read permission.'."\n"; |
|
| 53 | 53 | exit(1); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -32,8 +32,8 @@ |
||
| 32 | 32 | public function testIsListenerCalledOnlyOnceOnPreFlush() |
| 33 | 33 | { |
| 34 | 34 | $listener = $this->getMockBuilder(DDC2692Listener::class) |
| 35 | - ->setMethods(['preFlush']) |
|
| 36 | - ->getMock(); |
|
| 35 | + ->setMethods(['preFlush']) |
|
| 36 | + ->getMock(); |
|
| 37 | 37 | |
| 38 | 38 | $listener->expects($this->once())->method('preFlush'); |
| 39 | 39 | |
@@ -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\Ticket; |
| 6 | 6 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $this->em->getClassMetadata(DDC2692Foo::class), |
| 27 | 27 | ] |
| 28 | 28 | ); |
| 29 | - } catch(\Exception $e) { |
|
| 29 | + } catch (\Exception $e) { |
|
| 30 | 30 | return; |
| 31 | 31 | } |
| 32 | 32 | $this->em->clear(); |
@@ -32,8 +32,8 @@ |
||
| 32 | 32 | ->getMock(); |
| 33 | 33 | |
| 34 | 34 | $configuration = $this->getMockBuilder(Configuration::class) |
| 35 | - ->setMethods(['getMetadataDriverImpl']) |
|
| 36 | - ->getMock(); |
|
| 35 | + ->setMethods(['getMetadataDriverImpl']) |
|
| 36 | + ->getMock(); |
|
| 37 | 37 | |
| 38 | 38 | $connection = $this->createMock(Connection::class); |
| 39 | 39 | |
@@ -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\Ticket; |
| 6 | 6 | |
@@ -29,8 +29,8 @@ |
||
| 29 | 29 | $uow->scheduleExtraUpdate($user, ['name' => 'changed name']); |
| 30 | 30 | |
| 31 | 31 | $listener = $this->getMockBuilder(\stdClass::class) |
| 32 | - ->setMethods([Events::postFlush]) |
|
| 33 | - ->getMock(); |
|
| 32 | + ->setMethods([Events::postFlush]) |
|
| 33 | + ->getMock(); |
|
| 34 | 34 | |
| 35 | 35 | $listener |
| 36 | 36 | ->expects($this->once()) |
@@ -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\Ticket; |
| 6 | 6 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $listener |
| 38 | 38 | ->expects($this->once()) |
| 39 | 39 | ->method(Events::postFlush) |
| 40 | - ->will($this->returnCallback(function () use ($uow, $test) { |
|
| 40 | + ->will($this->returnCallback(function() use ($uow, $test) { |
|
| 41 | 41 | $test->assertAttributeEmpty('extraUpdates', $uow, 'ExtraUpdates are reset before postFlush'); |
| 42 | 42 | })); |
| 43 | 43 | |
@@ -136,24 +136,24 @@ |
||
| 136 | 136 | ->will($this->returnValue( 10 )); |
| 137 | 137 | |
| 138 | 138 | $parserResultMock = $this->getMockBuilder(ParserResult::class) |
| 139 | - ->setMethods(['getSqlExecutor']) |
|
| 140 | - ->getMock(); |
|
| 139 | + ->setMethods(['getSqlExecutor']) |
|
| 140 | + ->getMock(); |
|
| 141 | 141 | $parserResultMock->expects($this->once()) |
| 142 | - ->method('getSqlExecutor') |
|
| 143 | - ->will($this->returnValue($sqlExecMock)); |
|
| 142 | + ->method('getSqlExecutor') |
|
| 143 | + ->will($this->returnValue($sqlExecMock)); |
|
| 144 | 144 | |
| 145 | 145 | $cache = $this->getMockBuilder(CacheProvider::class) |
| 146 | - ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats']) |
|
| 147 | - ->getMock(); |
|
| 146 | + ->setMethods(['doFetch', 'doContains', 'doSave', 'doDelete', 'doFlush', 'doGetStats']) |
|
| 147 | + ->getMock(); |
|
| 148 | 148 | |
| 149 | 149 | $cache->expects($this->at(0))->method('doFetch')->will($this->returnValue(1)); |
| 150 | 150 | $cache->expects($this->at(1)) |
| 151 | - ->method('doFetch') |
|
| 152 | - ->with($this->isType('string')) |
|
| 153 | - ->will($this->returnValue($parserResultMock)); |
|
| 151 | + ->method('doFetch') |
|
| 152 | + ->with($this->isType('string')) |
|
| 153 | + ->will($this->returnValue($parserResultMock)); |
|
| 154 | 154 | |
| 155 | 155 | $cache->expects($this->never()) |
| 156 | - ->method('doSave'); |
|
| 156 | + ->method('doSave'); |
|
| 157 | 157 | |
| 158 | 158 | $query->setQueryCacheDriver($cache); |
| 159 | 159 | |
@@ -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 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | $sqlExecMock->expects($this->once()) |
| 137 | 137 | ->method('execute') |
| 138 | - ->will($this->returnValue( 10 )); |
|
| 138 | + ->will($this->returnValue(10)); |
|
| 139 | 139 | |
| 140 | 140 | $parserResultMock = $this->getMockBuilder(ParserResult::class) |
| 141 | 141 | ->setMethods(['getSqlExecutor']) |
@@ -302,8 +302,8 @@ |
||
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
| 305 | - * @group DDC-1955 |
|
| 306 | - */ |
|
| 305 | + * @group DDC-1955 |
|
| 306 | + */ |
|
| 307 | 307 | public function testLifecycleCallbackEventArgs() |
| 308 | 308 | { |
| 309 | 309 | $e = new LifecycleCallbackEventArgEntity; |
@@ -396,8 +396,16 @@ |
||
| 396 | 396 | private $name; |
| 397 | 397 | public function getId() {return $this->id;} |
| 398 | 398 | public function getValue() {return $this->value;} |
| 399 | + |
|
| 400 | + /** |
|
| 401 | + * @param string $value |
|
| 402 | + */ |
|
| 399 | 403 | public function setValue($value) {$this->value = $value;} |
| 400 | 404 | public function getName() {return $this->name;} |
| 405 | + |
|
| 406 | + /** |
|
| 407 | + * @param string $name |
|
| 408 | + */ |
|
| 401 | 409 | public function setName($name) {$this->name = $name;} |
| 402 | 410 | /** @ORM\PreUpdate */ |
| 403 | 411 | public function testCallback() {$this->value = 'Hello World';} |
@@ -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 | |
@@ -394,13 +394,13 @@ discard block |
||
| 394 | 394 | private $value; |
| 395 | 395 | /** @ORM\Column(type="string") */ |
| 396 | 396 | private $name; |
| 397 | - public function getId() {return $this->id;} |
|
| 398 | - public function getValue() {return $this->value;} |
|
| 399 | - public function setValue($value) {$this->value = $value;} |
|
| 400 | - public function getName() {return $this->name;} |
|
| 401 | - public function setName($name) {$this->name = $name;} |
|
| 397 | + public function getId() {return $this->id; } |
|
| 398 | + public function getValue() {return $this->value; } |
|
| 399 | + public function setValue($value) {$this->value = $value; } |
|
| 400 | + public function getName() {return $this->name; } |
|
| 401 | + public function setName($name) {$this->name = $name; } |
|
| 402 | 402 | /** @ORM\PreUpdate */ |
| 403 | - public function testCallback() {$this->value = 'Hello World';} |
|
| 403 | + public function testCallback() {$this->value = 'Hello World'; } |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | /** |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | class ResultCacheTest extends OrmFunctionalTestCase |
| 18 | 18 | { |
| 19 | - /** |
|
| 19 | + /** |
|
| 20 | 20 | * @var \ReflectionProperty |
| 21 | 21 | */ |
| 22 | 22 | private $cacheDataReflection; |
@@ -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; |
| 6 | 6 | |
@@ -189,8 +189,8 @@ |
||
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | /** |
| 192 | - * @group DDC-1663 |
|
| 193 | - */ |
|
| 192 | + * @group DDC-1663 |
|
| 193 | + */ |
|
| 194 | 194 | public function testAddNamedNativeQueryResultSetMappingWithoutFields() |
| 195 | 195 | { |
| 196 | 196 | $cm = new ClassMetadata(CmsUser::class); |
@@ -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\Hydration; |
| 6 | 6 | |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | { |
| 85 | 85 | $rms = $this->rsm; |
| 86 | 86 | |
| 87 | - $this->rsm->addEntityResult(CmsUser::class,'u'); |
|
| 88 | - $this->rsm->addJoinedEntityResult(CmsPhonenumber::class,'p','u','phonenumbers'); |
|
| 87 | + $this->rsm->addEntityResult(CmsUser::class, 'u'); |
|
| 88 | + $this->rsm->addJoinedEntityResult(CmsPhonenumber::class, 'p', 'u', 'phonenumbers'); |
|
| 89 | 89 | $this->rsm->addFieldResult('u', 'id', 'id'); |
| 90 | 90 | $this->rsm->addFieldResult('u', 'name', 'name'); |
| 91 | 91 | $this->rsm->setDiscriminatorColumn('name', 'name'); |
@@ -278,8 +278,8 @@ discard block |
||
| 278 | 278 | { |
| 279 | 279 | $this->rsm->addEntityResult(LegacyUser::class, 'u'); |
| 280 | 280 | $this->rsm->addJoinedEntityResult(LegacyUserReference::class, 'lu', 'u', '_references'); |
| 281 | - $this->rsm->addMetaResult('lu', '_source', '_source', true, Type::getType('integer')); |
|
| 282 | - $this->rsm->addMetaResult('lu', '_target', '_target', true, Type::getType('integer')); |
|
| 281 | + $this->rsm->addMetaResult('lu', '_source', '_source', true, Type::getType('integer')); |
|
| 282 | + $this->rsm->addMetaResult('lu', '_target', '_target', true, Type::getType('integer')); |
|
| 283 | 283 | $this->rsm->addIndexBy('lu', '_source'); |
| 284 | 284 | |
| 285 | 285 | self::assertTrue($this->rsm->hasIndexBy('lu')); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | public function providerParameterTypeInferer() |
| 15 | 15 | { |
| 16 | - $data = [ |
|
| 16 | + $data = [ |
|
| 17 | 17 | [1, Type::INTEGER], |
| 18 | 18 | ["bar", PDO::PARAM_STR], |
| 19 | 19 | ["1", PDO::PARAM_STR], |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | [["1","2"], Connection::PARAM_STR_ARRAY], |
| 24 | 24 | [[], Connection::PARAM_STR_ARRAY], |
| 25 | 25 | [true, Type::BOOLEAN], |
| 26 | - ]; |
|
| 26 | + ]; |
|
| 27 | 27 | |
| 28 | 28 | if (PHP_VERSION_ID >= 50500) { |
| 29 | 29 | $data[] = [new \DateTimeImmutable(), Type::DATETIME]; |
@@ -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\Query; |
| 6 | 6 | |
@@ -16,15 +16,15 @@ discard block |
||
| 16 | 16 | public function providerParameterTypeInferer() |
| 17 | 17 | { |
| 18 | 18 | $data = [ |
| 19 | - [1, Type::INTEGER], |
|
| 20 | - ["bar", PDO::PARAM_STR], |
|
| 21 | - ["1", PDO::PARAM_STR], |
|
| 22 | - [new \DateTime, Type::DATETIME], |
|
| 23 | - [[2], Connection::PARAM_INT_ARRAY], |
|
| 24 | - [["foo"], Connection::PARAM_STR_ARRAY], |
|
| 25 | - [["1","2"], Connection::PARAM_STR_ARRAY], |
|
| 26 | - [[], Connection::PARAM_STR_ARRAY], |
|
| 27 | - [true, Type::BOOLEAN], |
|
| 19 | + [1, Type::INTEGER], |
|
| 20 | + ["bar", PDO::PARAM_STR], |
|
| 21 | + ["1", PDO::PARAM_STR], |
|
| 22 | + [new \DateTime, Type::DATETIME], |
|
| 23 | + [[2], Connection::PARAM_INT_ARRAY], |
|
| 24 | + [["foo"], Connection::PARAM_STR_ARRAY], |
|
| 25 | + [["1", "2"], Connection::PARAM_STR_ARRAY], |
|
| 26 | + [[], Connection::PARAM_STR_ARRAY], |
|
| 27 | + [true, Type::BOOLEAN], |
|
| 28 | 28 | ]; |
| 29 | 29 | |
| 30 | 30 | if (PHP_VERSION_ID >= 50500) { |