@@ -12,11 +12,11 @@ |
||
| 12 | 12 | use Entities\Address; |
| 13 | 13 | use Entities\User; |
| 14 | 14 | |
| 15 | -$em = require_once __DIR__ . '/bootstrap.php'; |
|
| 15 | +$em = require_once __DIR__.'/bootstrap.php'; |
|
| 16 | 16 | |
| 17 | 17 | ## PUT YOUR TEST CODE BELOW |
| 18 | 18 | |
| 19 | 19 | $user = new User; |
| 20 | 20 | $address = new Address; |
| 21 | 21 | |
| 22 | -echo 'Hello World!' . PHP_EOL; |
|
| 22 | +echo 'Hello World!'.PHP_EOL; |
|
@@ -5,8 +5,8 @@ discard block |
||
| 5 | 5 | |
| 6 | 6 | // Path to composer autoloader. You can use different provided by your favorite framework, |
| 7 | 7 | // if you want to. |
| 8 | -$loaderPath = __DIR__ . '/../../vendor/autoload.php'; |
|
| 9 | -if(!is_readable($loaderPath)){ |
|
| 8 | +$loaderPath = __DIR__.'/../../vendor/autoload.php'; |
|
| 9 | +if ( ! is_readable($loaderPath)) { |
|
| 10 | 10 | throw new LogicException('Run php composer.phar install at first'); |
| 11 | 11 | } |
| 12 | 12 | $loader = require $loaderPath; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $config = new \Doctrine\ORM\Configuration(); |
| 20 | 20 | |
| 21 | 21 | // Set up Metadata Drivers |
| 22 | -$driverImpl = $config->newDefaultAnnotationDriver([__DIR__ . "/Entities"]); |
|
| 22 | +$driverImpl = $config->newDefaultAnnotationDriver([__DIR__."/Entities"]); |
|
| 23 | 23 | $config->setMetadataDriverImpl($driverImpl); |
| 24 | 24 | |
| 25 | 25 | // Set up caches, depending on $debug variable. |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $config->setQueryCacheImpl($cache); |
| 30 | 30 | |
| 31 | 31 | // Proxy configuration |
| 32 | -$config->setProxyDir(__DIR__ . '/Proxies'); |
|
| 32 | +$config->setProxyDir(__DIR__.'/Proxies'); |
|
| 33 | 33 | $config->setProxyNamespace('Proxies'); |
| 34 | 34 | |
| 35 | 35 | // Database connection information |
@@ -2,28 +2,28 @@ |
||
| 2 | 2 | /* |
| 3 | 3 | * This file bootstraps the test environment. |
| 4 | 4 | */ |
| 5 | -declare(strict_types=1); |
|
| 5 | +declare(strict_types = 1); |
|
| 6 | 6 | |
| 7 | 7 | namespace Doctrine\Tests; |
| 8 | 8 | |
| 9 | 9 | error_reporting(E_ALL | E_STRICT); |
| 10 | 10 | date_default_timezone_set('UTC'); |
| 11 | 11 | |
| 12 | -if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) { |
|
| 12 | +if (file_exists(__DIR__.'/../../../vendor/autoload.php')) { |
|
| 13 | 13 | // dependencies were installed via composer - this is the main project |
| 14 | - require __DIR__ . '/../../../vendor/autoload.php'; |
|
| 15 | -} elseif (file_exists(__DIR__ . '/../../../../../autoload.php')) { |
|
| 14 | + require __DIR__.'/../../../vendor/autoload.php'; |
|
| 15 | +} elseif (file_exists(__DIR__.'/../../../../../autoload.php')) { |
|
| 16 | 16 | // installed as a dependency in `vendor` |
| 17 | - require __DIR__ . '/../../../../../autoload.php'; |
|
| 17 | + require __DIR__.'/../../../../../autoload.php'; |
|
| 18 | 18 | } else { |
| 19 | 19 | throw new \Exception('Can\'t find autoload.php. Did you install dependencies via composer?'); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | -if ( ! file_exists(__DIR__ . '/Proxies') && ! mkdir(__DIR__ . '/Proxies')) { |
|
| 23 | - throw new \Exception("Could not create " . __DIR__."/Proxies Folder."); |
|
| 22 | +if ( ! file_exists(__DIR__.'/Proxies') && ! mkdir(__DIR__.'/Proxies')) { |
|
| 23 | + throw new \Exception("Could not create ".__DIR__."/Proxies Folder."); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | -if ( ! file_exists(__DIR__ . '/ORM/Proxy/generated') && ! mkdir(__DIR__ . '/ORM/Proxy/generated')) { |
|
| 27 | - throw new \Exception('Could not create ' . __DIR__ . '/ORM/Proxy/generated Folder.'); |
|
| 26 | +if ( ! file_exists(__DIR__.'/ORM/Proxy/generated') && ! mkdir(__DIR__.'/ORM/Proxy/generated')) { |
|
| 27 | + throw new \Exception('Could not create '.__DIR__.'/ORM/Proxy/generated Folder.'); |
|
| 28 | 28 | } |
| 29 | 29 | |
@@ -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; |
| 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; |
| 6 | 6 | |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | $conn->executeUpdate('DELETE FROM RoutingLocation'); |
| 402 | 402 | } |
| 403 | 403 | |
| 404 | - if(isset($this->usedModelSets['navigation'])) { |
|
| 404 | + if (isset($this->usedModelSets['navigation'])) { |
|
| 405 | 405 | $conn->executeUpdate('DELETE FROM navigation_tour_pois'); |
| 406 | 406 | $conn->executeUpdate('DELETE FROM navigation_photos'); |
| 407 | 407 | $conn->executeUpdate('DELETE FROM navigation_pois'); |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | $conn->executeUpdate('DELETE FROM navigation_countries'); |
| 410 | 410 | } |
| 411 | 411 | if (isset($this->usedModelSets['directorytree'])) { |
| 412 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("file")); |
|
| 412 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier("file")); |
|
| 413 | 413 | // MySQL doesn't know deferred deletions therefore only executing the second query gives errors. |
| 414 | 414 | $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL'); |
| 415 | 415 | $conn->executeUpdate('DELETE FROM Directory'); |
@@ -499,12 +499,12 @@ discard block |
||
| 499 | 499 | ) |
| 500 | 500 | ); |
| 501 | 501 | |
| 502 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-users-groups')); |
|
| 503 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-group")); |
|
| 504 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-phone")); |
|
| 505 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-user")); |
|
| 506 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier("quote-address")); |
|
| 507 | - $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-city')); |
|
| 502 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-users-groups')); |
|
| 503 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier("quote-group")); |
|
| 504 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier("quote-phone")); |
|
| 505 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier("quote-user")); |
|
| 506 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier("quote-address")); |
|
| 507 | + $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-city')); |
|
| 508 | 508 | } |
| 509 | 509 | |
| 510 | 510 | if (isset($this->usedModelSets['vct_onetoone'])) { |
@@ -639,15 +639,15 @@ discard block |
||
| 639 | 639 | { |
| 640 | 640 | $this->setUpDBALTypes(); |
| 641 | 641 | |
| 642 | - if (! isset(static::$sharedConn)) { |
|
| 642 | + if ( ! isset(static::$sharedConn)) { |
|
| 643 | 643 | static::$sharedConn = TestUtil::getConnection(); |
| 644 | 644 | } |
| 645 | 645 | |
| 646 | 646 | if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) { |
| 647 | 647 | if (in_array(static::$sharedConn->getDatabasePlatform()->getName(), ["mysql", "postgresql"])) { |
| 648 | - static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/'); |
|
| 648 | + static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/'); |
|
| 649 | 649 | } else if (static::$sharedConn->getDatabasePlatform()->getName() === "oracle") { |
| 650 | - static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/ FROM dual'); |
|
| 650 | + static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/ FROM dual'); |
|
| 651 | 651 | } |
| 652 | 652 | } |
| 653 | 653 | |
@@ -657,7 +657,7 @@ discard block |
||
| 657 | 657 | } |
| 658 | 658 | |
| 659 | 659 | foreach ($this->usedModelSets as $setName => $bool) { |
| 660 | - if (! isset(static::$tablesCreated[$setName])) { |
|
| 660 | + if ( ! isset(static::$tablesCreated[$setName])) { |
|
| 661 | 661 | $this->setUpEntitySchema(static::$modelSets[$setName]); |
| 662 | 662 | |
| 663 | 663 | static::$tablesCreated[$setName] = true; |
@@ -700,7 +700,7 @@ discard block |
||
| 700 | 700 | |
| 701 | 701 | $config->setMetadataCacheImpl(self::$metadataCacheImpl); |
| 702 | 702 | $config->setQueryCacheImpl(self::$queryCacheImpl); |
| 703 | - $config->setProxyDir(__DIR__ . '/Proxies'); |
|
| 703 | + $config->setProxyDir(__DIR__.'/Proxies'); |
|
| 704 | 704 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
| 705 | 705 | |
| 706 | 706 | if (null !== $this->resultCacheImpl) { |
@@ -732,8 +732,8 @@ discard block |
||
| 732 | 732 | |
| 733 | 733 | $config->setMetadataDriverImpl( |
| 734 | 734 | $config->newDefaultAnnotationDriver([ |
| 735 | - realpath(__DIR__ . '/Models/Cache'), |
|
| 736 | - realpath(__DIR__ . '/Models/GeoNames') |
|
| 735 | + realpath(__DIR__.'/Models/Cache'), |
|
| 736 | + realpath(__DIR__.'/Models/GeoNames') |
|
| 737 | 737 | ]) |
| 738 | 738 | ); |
| 739 | 739 | |
@@ -797,9 +797,9 @@ discard block |
||
| 797 | 797 | $trace = $e->getTrace(); |
| 798 | 798 | $traceMsg = ""; |
| 799 | 799 | |
| 800 | - foreach($trace AS $part) { |
|
| 801 | - if(isset($part['file'])) { |
|
| 802 | - if(strpos($part['file'], "PHPUnit/") !== false) { |
|
| 800 | + foreach ($trace AS $part) { |
|
| 801 | + if (isset($part['file'])) { |
|
| 802 | + if (strpos($part['file'], "PHPUnit/") !== false) { |
|
| 803 | 803 | // Beginning with PHPUnit files we don't print the trace anymore. |
| 804 | 804 | break; |
| 805 | 805 | } |
@@ -810,7 +810,7 @@ discard block |
||
| 810 | 810 | |
| 811 | 811 | $message = "[".get_class($e)."] ".$e->getMessage().PHP_EOL.PHP_EOL."With queries:".PHP_EOL.$queries.PHP_EOL."Trace:".PHP_EOL.$traceMsg; |
| 812 | 812 | |
| 813 | - throw new \Exception($message, (int)$e->getCode(), $e); |
|
| 813 | + throw new \Exception($message, (int) $e->getCode(), $e); |
|
| 814 | 814 | } |
| 815 | 815 | |
| 816 | 816 | throw $e; |
@@ -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; |
| 6 | 6 | |
@@ -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\Utility; |
| 6 | 6 | |
@@ -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\Proxy; |
| 6 | 6 | |
@@ -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\Mapping; |
| 6 | 6 | |