@@ -9,8 +9,8 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | // Path to composer autoloader. You can use different provided by your favorite framework, |
| 11 | 11 | // if you want to. |
| 12 | -$loaderPath = __DIR__ . '/../../vendor/autoload.php'; |
|
| 13 | -if (! is_readable($loaderPath)) { |
|
| 12 | +$loaderPath = __DIR__.'/../../vendor/autoload.php'; |
|
| 13 | +if ( ! is_readable($loaderPath)) { |
|
| 14 | 14 | throw new LogicException('Run php composer.phar install at first'); |
| 15 | 15 | } |
| 16 | 16 | $loader = require $loaderPath; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $config = new Configuration(); |
| 24 | 24 | |
| 25 | 25 | // Set up Metadata Drivers |
| 26 | -$driverImpl = $config->newDefaultAnnotationDriver([__DIR__ . '/Entities']); |
|
| 26 | +$driverImpl = $config->newDefaultAnnotationDriver([__DIR__.'/Entities']); |
|
| 27 | 27 | $config->setMetadataDriverImpl($driverImpl); |
| 28 | 28 | |
| 29 | 29 | // Set up caches, depending on $debug variable. |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $config->setQueryCacheImpl($cache); |
| 34 | 34 | |
| 35 | 35 | // Proxy configuration |
| 36 | -$config->setProxyDir(__DIR__ . '/Proxies'); |
|
| 36 | +$config->setProxyDir(__DIR__.'/Proxies'); |
|
| 37 | 37 | $config->setProxyNamespace('Proxies'); |
| 38 | 38 | |
| 39 | 39 | // Database connection information |
@@ -13,11 +13,11 @@ |
||
| 13 | 13 | use Entities\User; |
| 14 | 14 | use const PHP_EOL; |
| 15 | 15 | |
| 16 | -$em = require_once __DIR__ . '/bootstrap.php'; |
|
| 16 | +$em = require_once __DIR__.'/bootstrap.php'; |
|
| 17 | 17 | |
| 18 | 18 | // PUT YOUR TEST CODE BELOW |
| 19 | 19 | |
| 20 | 20 | $user = new User(); |
| 21 | 21 | $address = new Address(); |
| 22 | 22 | |
| 23 | -echo 'Hello World!' . PHP_EOL; |
|
| 23 | +echo 'Hello World!'.PHP_EOL; |
|
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -$em = require_once __DIR__ . '/bootstrap.php'; |
|
| 4 | +$em = require_once __DIR__.'/bootstrap.php'; |
|
| 5 | 5 | use Doctrine\DBAL\Tools\Console\Command\ImportCommand; |
| 6 | 6 | use Doctrine\DBAL\Tools\Console\Command\RunSqlCommand; |
| 7 | 7 | use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper; |
@@ -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\ORM\Mapping\Exporter; |
| 6 | 6 | |
@@ -24,30 +24,30 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | public function export($value, int $indentationLevel = 0) : string |
| 26 | 26 | { |
| 27 | - if (! is_array($value)) { |
|
| 27 | + if ( ! is_array($value)) { |
|
| 28 | 28 | return var_export($value, true); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
| 32 | - $longestKey = array_reduce(array_keys($value), function ($k, $v) { |
|
| 32 | + $longestKey = array_reduce(array_keys($value), function($k, $v) { |
|
| 33 | 33 | return (string) (strlen((string) $k) > strlen((string) $v) ? $k : $v); |
| 34 | 34 | }); |
| 35 | 35 | $maxKeyLength = strlen($longestKey) + (is_numeric($longestKey) ? 0 : 2); |
| 36 | 36 | |
| 37 | 37 | $lines = []; |
| 38 | 38 | |
| 39 | - $lines[] = $indentation . '['; |
|
| 39 | + $lines[] = $indentation.'['; |
|
| 40 | 40 | |
| 41 | 41 | foreach ($value as $entryKey => $entryValue) { |
| 42 | 42 | $lines[] = sprintf( |
| 43 | 43 | '%s%s => %s,', |
| 44 | - $indentation . self::INDENTATION, |
|
| 44 | + $indentation.self::INDENTATION, |
|
| 45 | 45 | str_pad(var_export($entryKey, true), $maxKeyLength), |
| 46 | 46 | ltrim($this->export($entryValue, $indentationLevel + 1)) |
| 47 | 47 | ); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - $lines[] = $indentation . ']'; |
|
| 50 | + $lines[] = $indentation.']'; |
|
| 51 | 51 | |
| 52 | 52 | return implode(PHP_EOL, $lines); |
| 53 | 53 | } |