@@ -43,7 +43,7 @@ |
||
| 43 | 43 | public function fetchColumn($columnNumber = 0) |
| 44 | 44 | { |
| 45 | 45 | $row = current($this->resultSet); |
| 46 | - if (! is_array($row)) { |
|
| 46 | + if ( ! is_array($row)) { |
|
| 47 | 47 | return false; |
| 48 | 48 | } |
| 49 | 49 | $val = array_shift($row); |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function getDatabasePlatform() |
| 35 | 35 | { |
| 36 | - if (! $this->platformMock) { |
|
| 36 | + if ( ! $this->platformMock) { |
|
| 37 | 37 | $this->platformMock = new DatabasePlatformMock(); |
| 38 | 38 | } |
| 39 | 39 | return $this->platformMock; |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | if ($config === null) { |
| 77 | 77 | $config = new Configuration(); |
| 78 | 78 | |
| 79 | - $config->setProxyDir(__DIR__ . '/../Proxies'); |
|
| 79 | + $config->setProxyDir(__DIR__.'/../Proxies'); |
|
| 80 | 80 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
| 81 | 81 | $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver()); |
| 82 | 82 | } |
@@ -192,7 +192,7 @@ |
||
| 192 | 192 | |
| 193 | 193 | $this->throwException(__FUNCTION__); |
| 194 | 194 | |
| 195 | - if (! isset($this->locks[$key->hash])) { |
|
| 195 | + if ( ! isset($this->locks[$key->hash])) { |
|
| 196 | 196 | return; |
| 197 | 197 | } |
| 198 | 198 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function setMaxRunningTime($maxRunningTime) |
| 43 | 43 | { |
| 44 | - if (! (is_int($maxRunningTime) && $maxRunningTime >= 0)) { |
|
| 44 | + if ( ! (is_int($maxRunningTime) && $maxRunningTime >= 0)) { |
|
| 45 | 45 | throw new \InvalidArgumentException(); |
| 46 | 46 | } |
| 47 | 47 | |
@@ -14,20 +14,20 @@ |
||
| 14 | 14 | error_reporting(E_ALL | E_STRICT); |
| 15 | 15 | date_default_timezone_set('UTC'); |
| 16 | 16 | |
| 17 | -if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) { |
|
| 17 | +if (file_exists(__DIR__.'/../../../vendor/autoload.php')) { |
|
| 18 | 18 | // dependencies were installed via composer - this is the main project |
| 19 | - require __DIR__ . '/../../../vendor/autoload.php'; |
|
| 20 | -} elseif (file_exists(__DIR__ . '/../../../../../autoload.php')) { |
|
| 19 | + require __DIR__.'/../../../vendor/autoload.php'; |
|
| 20 | +} elseif (file_exists(__DIR__.'/../../../../../autoload.php')) { |
|
| 21 | 21 | // installed as a dependency in `vendor` |
| 22 | - require __DIR__ . '/../../../../../autoload.php'; |
|
| 22 | + require __DIR__.'/../../../../../autoload.php'; |
|
| 23 | 23 | } else { |
| 24 | 24 | throw new \Exception('Can\'t find autoload.php. Did you install dependencies via composer?'); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | -if (! file_exists(__DIR__ . '/Proxies') && ! mkdir(__DIR__ . '/Proxies')) { |
|
| 28 | - throw new \Exception('Could not create ' . __DIR__ . '/Proxies Folder.'); |
|
| 27 | +if ( ! file_exists(__DIR__.'/Proxies') && ! mkdir(__DIR__.'/Proxies')) { |
|
| 28 | + throw new \Exception('Could not create '.__DIR__.'/Proxies Folder.'); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | -if (! file_exists(__DIR__ . '/ORM/Proxy/generated') && ! mkdir(__DIR__ . '/ORM/Proxy/generated')) { |
|
| 32 | - throw new \Exception('Could not create ' . __DIR__ . '/ORM/Proxy/generated Folder.'); |
|
| 31 | +if ( ! file_exists(__DIR__.'/ORM/Proxy/generated') && ! mkdir(__DIR__.'/ORM/Proxy/generated')) { |
|
| 32 | + throw new \Exception('Could not create '.__DIR__.'/ORM/Proxy/generated Folder.'); |
|
| 33 | 33 | } |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | { |
| 91 | 91 | $realDbParams = self::getParamsForMainConnection(); |
| 92 | 92 | |
| 93 | - if (! self::$initialized) { |
|
| 93 | + if ( ! self::$initialized) { |
|
| 94 | 94 | $tmpDbParams = self::getParamsForTemporaryConnection(); |
| 95 | 95 | |
| 96 | 96 | $realConn = DriverManager::getConnection($realDbParams); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | protected function createRegion() |
| 60 | 60 | { |
| 61 | - $this->directory = sys_get_temp_dir() . '/doctrine_lock_' . uniqid(); |
|
| 61 | + $this->directory = sys_get_temp_dir().'/doctrine_lock_'.uniqid(); |
|
| 62 | 62 | |
| 63 | 63 | $region = new DefaultRegion('concurren_region_test', $this->cache); |
| 64 | 64 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | $reflectionDirectory->setAccessible(true); |
| 262 | 262 | $reflectionDirectory->setValue($region, str_repeat('a', 10000)); |
| 263 | 263 | |
| 264 | - set_error_handler(function () { |
|
| 264 | + set_error_handler(function() { |
|
| 265 | 265 | }, E_WARNING); |
| 266 | 266 | self::assertTrue($region->evictAll()); |
| 267 | 267 | restore_error_handler(); |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | { |
| 275 | 275 | $path = $path ?: $this->directory; |
| 276 | 276 | |
| 277 | - if (! is_dir($path)) { |
|
| 277 | + if ( ! is_dir($path)) { |
|
| 278 | 278 | return; |
| 279 | 279 | } |
| 280 | 280 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $city->getName()]); |
| 391 | 391 | $uow->registerManaged($city, ['id' => $city->getId()], ['name' => $city->getName(), 'state' => $state]); |
| 392 | 392 | |
| 393 | - $this->region->addReturn('put', true); // put root entity |
|
| 393 | + $this->region->addReturn('put', true); // put root entity |
|
| 394 | 394 | $this->region->addReturn('put', false); // association fails |
| 395 | 395 | |
| 396 | 396 | self::assertFalse($this->queryCache->put($key, $rsm, $result)); |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | $uow->registerManaged($city2, ['id' => $city2->getId()], ['name' => $city2->getName(), 'state' => $state]); |
| 424 | 424 | $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $state->getName(), 'cities' => $state->getCities()]); |
| 425 | 425 | |
| 426 | - $this->region->addReturn('put', true); // put root entity |
|
| 426 | + $this->region->addReturn('put', true); // put root entity |
|
| 427 | 427 | $this->region->addReturn('put', false); // collection association fails |
| 428 | 428 | |
| 429 | 429 | self::assertFalse($this->queryCache->put($key, $rsm, $result)); |