@@ -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\Models\ProxySpecifics; |
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\ORM\Hydration; |
6 | 6 | |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | ]; |
1026 | 1026 | |
1027 | 1027 | $proxyInstance = (new LazyLoadingGhostFactory(new Configuration())) |
1028 | - ->createProxy(ECommerceShipping::class, function () { |
|
1028 | + ->createProxy(ECommerceShipping::class, function() { |
|
1029 | 1029 | self::fail('Proxy is not supposed to be lazy-loaded'); |
1030 | 1030 | }); |
1031 | 1031 | |
@@ -1076,7 +1076,7 @@ discard block |
||
1076 | 1076 | ]; |
1077 | 1077 | |
1078 | 1078 | $proxyInstance = (new LazyLoadingGhostFactory(new Configuration())) |
1079 | - ->createProxy(ECommerceShipping::class, function () { |
|
1079 | + ->createProxy(ECommerceShipping::class, function() { |
|
1080 | 1080 | self::fail('Proxy is not supposed to be lazy-loaded'); |
1081 | 1081 | }); |
1082 | 1082 |
@@ -1914,10 +1914,10 @@ discard block |
||
1914 | 1914 | $rsm->setDiscriminatorColumn('c', 'c_discr'); |
1915 | 1915 | |
1916 | 1916 | $resultSet = [ |
1917 | - [ |
|
1918 | - 'c__id' => '1', |
|
1919 | - 'c_discr' => 'fix', |
|
1920 | - ], |
|
1917 | + [ |
|
1918 | + 'c__id' => '1', |
|
1919 | + 'c_discr' => 'fix', |
|
1920 | + ], |
|
1921 | 1921 | ]; |
1922 | 1922 | |
1923 | 1923 | $stmt = new HydratorMockStatement($resultSet); |
@@ -1946,12 +1946,12 @@ discard block |
||
1946 | 1946 | $rsm->setDiscriminatorColumn('e', 'e_discr'); |
1947 | 1947 | |
1948 | 1948 | $resultSet = [ |
1949 | - [ |
|
1950 | - 'c__id' => '1', |
|
1951 | - 'c_discr' => 'fix', |
|
1952 | - 'e__id' => '1', |
|
1953 | - 'e__name' => 'Fabio B. Silva', |
|
1954 | - ], |
|
1949 | + [ |
|
1950 | + 'c__id' => '1', |
|
1951 | + 'c_discr' => 'fix', |
|
1952 | + 'e__id' => '1', |
|
1953 | + 'e__name' => 'Fabio B. Silva', |
|
1954 | + ], |
|
1955 | 1955 | ]; |
1956 | 1956 | |
1957 | 1957 | $stmt = new HydratorMockStatement($resultSet); |
@@ -1976,11 +1976,11 @@ discard block |
||
1976 | 1976 | $rsm->setDiscriminatorColumn('p', 'discr'); |
1977 | 1977 | |
1978 | 1978 | $resultSet = [ |
1979 | - [ |
|
1980 | - 'p__id' => '1', |
|
1981 | - 'p__name' => 'Fabio B. Silva', |
|
1982 | - 'discr' => 'subworker', |
|
1983 | - ], |
|
1979 | + [ |
|
1980 | + 'p__id' => '1', |
|
1981 | + 'p__name' => 'Fabio B. Silva', |
|
1982 | + 'discr' => 'subworker', |
|
1983 | + ], |
|
1984 | 1984 | ]; |
1985 | 1985 | |
1986 | 1986 | $stmt = new HydratorMockStatement($resultSet); |
@@ -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\Models\OneToOneInverseSideLoad; |
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\Models\OneToOneInverseSideLoad; |
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\ORM; |
6 | 6 | |
@@ -294,8 +294,8 @@ discard block |
||
294 | 294 | */ |
295 | 295 | private function resolveMagicCall($method, $by, array $arguments) |
296 | 296 | { |
297 | - if (! $arguments) { |
|
298 | - throw InvalidMagicMethodCall::onMissingParameter($method . $by); |
|
297 | + if ( ! $arguments) { |
|
298 | + throw InvalidMagicMethodCall::onMissingParameter($method.$by); |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | $fieldName = lcfirst(Inflector::classify($by)); |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | throw InvalidMagicMethodCall::becauseFieldNotFoundIn( |
305 | 305 | $this->entityName, |
306 | 306 | $fieldName, |
307 | - $method . $by |
|
307 | + $method.$by |
|
308 | 308 | ); |
309 | 309 | } |
310 | 310 |
@@ -45,14 +45,14 @@ |
||
45 | 45 | protected function configure() |
46 | 46 | { |
47 | 47 | $this->setName('orm:run-dql') |
48 | - ->setDescription('Executes arbitrary DQL directly from the command line') |
|
49 | - ->addArgument('dql', InputArgument::REQUIRED, 'The DQL to execute.') |
|
50 | - ->addOption('hydrate', null, InputOption::VALUE_REQUIRED, 'Hydration mode of result set. Should be either: object, array, scalar or single-scalar.', 'object') |
|
51 | - ->addOption('first-result', null, InputOption::VALUE_REQUIRED, 'The first result in the result set.') |
|
52 | - ->addOption('max-result', null, InputOption::VALUE_REQUIRED, 'The maximum number of results in the result set.') |
|
53 | - ->addOption('depth', null, InputOption::VALUE_REQUIRED, 'Dumping depth of Entity graph.', 7) |
|
54 | - ->addOption('show-sql', null, InputOption::VALUE_NONE, 'Dump generated SQL instead of executing query') |
|
55 | - ->setHelp('Executes arbitrary DQL directly from the command line.'); |
|
48 | + ->setDescription('Executes arbitrary DQL directly from the command line') |
|
49 | + ->addArgument('dql', InputArgument::REQUIRED, 'The DQL to execute.') |
|
50 | + ->addOption('hydrate', null, InputOption::VALUE_REQUIRED, 'Hydration mode of result set. Should be either: object, array, scalar or single-scalar.', 'object') |
|
51 | + ->addOption('first-result', null, InputOption::VALUE_REQUIRED, 'The first result in the result set.') |
|
52 | + ->addOption('max-result', null, InputOption::VALUE_REQUIRED, 'The maximum number of results in the result set.') |
|
53 | + ->addOption('depth', null, InputOption::VALUE_REQUIRED, 'Dumping depth of Entity graph.', 7) |
|
54 | + ->addOption('show-sql', null, InputOption::VALUE_NONE, 'Dump generated SQL instead of executing query') |
|
55 | + ->setHelp('Executes arbitrary DQL directly from the command line.'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -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\Tools\Console\Command; |
6 | 6 | |
@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | |
51 | 51 | $depth = $input->getOption('depth'); |
52 | 52 | |
53 | - if (! is_numeric($depth)) { |
|
53 | + if ( ! is_numeric($depth)) { |
|
54 | 54 | throw new \LogicException("Option 'depth' must contain an integer value"); |
55 | 55 | } |
56 | 56 | |
57 | 57 | $hydrationModeName = $input->getOption('hydrate'); |
58 | - $hydrationMode = 'Doctrine\ORM\Query::HYDRATE_' . strtoupper(str_replace('-', '_', $hydrationModeName)); |
|
58 | + $hydrationMode = 'Doctrine\ORM\Query::HYDRATE_'.strtoupper(str_replace('-', '_', $hydrationModeName)); |
|
59 | 59 | |
60 | - if (! defined($hydrationMode)) { |
|
60 | + if ( ! defined($hydrationMode)) { |
|
61 | 61 | throw new \RuntimeException(sprintf( |
62 | 62 | "Hydration mode '%s' does not exist. It should be either: object. array, scalar or single-scalar.", |
63 | 63 | $hydrationModeName |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $firstResult = $input->getOption('first-result'); |
69 | 69 | |
70 | 70 | if ($firstResult !== null) { |
71 | - if (! is_numeric($firstResult)) { |
|
71 | + if ( ! is_numeric($firstResult)) { |
|
72 | 72 | throw new \LogicException("Option 'first-result' must contain an integer value"); |
73 | 73 | } |
74 | 74 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $maxResult = $input->getOption('max-result'); |
79 | 79 | |
80 | 80 | if ($maxResult !== null) { |
81 | - if (! is_numeric($maxResult)) { |
|
81 | + if ( ! is_numeric($maxResult)) { |
|
82 | 82 | throw new \LogicException("Option 'max-result' must contain an integer value"); |
83 | 83 | } |
84 | 84 |
@@ -45,10 +45,10 @@ |
||
45 | 45 | protected function configure() |
46 | 46 | { |
47 | 47 | $this->setName('orm:validate-schema') |
48 | - ->setDescription('Validate the mapping files') |
|
49 | - ->addOption('skip-mapping', null, InputOption::VALUE_NONE, 'Skip the mapping validation check') |
|
50 | - ->addOption('skip-sync', null, InputOption::VALUE_NONE, 'Skip checking if the mapping is in sync with the database') |
|
51 | - ->setHelp('Validate that the mapping files are correct and in sync with the database.'); |
|
48 | + ->setDescription('Validate the mapping files') |
|
49 | + ->addOption('skip-mapping', null, InputOption::VALUE_NONE, 'Skip the mapping validation check') |
|
50 | + ->addOption('skip-sync', null, InputOption::VALUE_NONE, 'Skip checking if the mapping is in sync with the database') |
|
51 | + ->setHelp('Validate that the mapping files are correct and in sync with the database.'); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -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\Tools\Console\Command; |
6 | 6 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $ui->text('<comment>[SKIPPED] The mapping was not checked.</comment>'); |
46 | 46 | } |
47 | 47 | |
48 | - if (! $skipMapping) { |
|
48 | + if ( ! $skipMapping) { |
|
49 | 49 | $errors = $validator->validateMapping(); |
50 | 50 | |
51 | 51 | if ($errors) { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | if ($input->getOption('skip-sync')) { |
73 | 73 | $ui->text('<comment>[SKIPPED] The database was not checked for synchronicity.</comment>'); |
74 | - } elseif (! $validator->schemaInSyncWithMetadata()) { |
|
74 | + } elseif ( ! $validator->schemaInSyncWithMetadata()) { |
|
75 | 75 | $ui->error('The database schema is not in sync with the current mapping file.'); |
76 | 76 | $exit += 2; |
77 | 77 | } else { |
@@ -45,9 +45,9 @@ |
||
45 | 45 | protected function configure() |
46 | 46 | { |
47 | 47 | $this->setName('orm:ensure-production-settings') |
48 | - ->setDescription('Verify that Doctrine is properly configured for a production environment') |
|
49 | - ->addOption('complete', null, InputOption::VALUE_NONE, 'Flag to also inspect database connection existence.') |
|
50 | - ->setHelp('Verify that Doctrine is properly configured for a production environment.'); |
|
48 | + ->setDescription('Verify that Doctrine is properly configured for a production environment') |
|
49 | + ->addOption('complete', null, InputOption::VALUE_NONE, 'Flag to also inspect database connection existence.') |
|
50 | + ->setHelp('Verify that Doctrine is properly configured for a production environment.'); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -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\ORM\Tools\Console\Command; |
6 | 6 |
@@ -46,11 +46,11 @@ |
||
46 | 46 | protected function configure() |
47 | 47 | { |
48 | 48 | $this->setName('orm:generate-proxies') |
49 | - ->setAliases(['orm:generate:proxies']) |
|
50 | - ->setDescription('Generates proxy classes for entity classes') |
|
51 | - ->addArgument('dest-path', InputArgument::OPTIONAL, 'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.') |
|
52 | - ->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.') |
|
53 | - ->setHelp('Generates proxy classes for entity classes.'); |
|
49 | + ->setAliases(['orm:generate:proxies']) |
|
50 | + ->setDescription('Generates proxy classes for entity classes') |
|
51 | + ->addArgument('dest-path', InputArgument::OPTIONAL, 'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.') |
|
52 | + ->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.') |
|
53 | + ->setHelp('Generates proxy classes for entity classes.'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -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\Tools\Console\Command; |
6 | 6 | |
@@ -50,19 +50,19 @@ discard block |
||
50 | 50 | $destPath = $em->getConfiguration()->getProxyDir(); |
51 | 51 | } |
52 | 52 | |
53 | - if (! is_dir($destPath)) { |
|
53 | + if ( ! is_dir($destPath)) { |
|
54 | 54 | mkdir($destPath, 0775, true); |
55 | 55 | } |
56 | 56 | |
57 | 57 | $destPath = realpath($destPath); |
58 | 58 | |
59 | - if (! file_exists($destPath)) { |
|
59 | + if ( ! file_exists($destPath)) { |
|
60 | 60 | throw new \InvalidArgumentException( |
61 | 61 | sprintf("Proxies destination directory '<info>%s</info>' does not exist.", $em->getConfiguration()->getProxyDir()) |
62 | 62 | ); |
63 | 63 | } |
64 | 64 | |
65 | - if (! is_writable($destPath)) { |
|
65 | + if ( ! is_writable($destPath)) { |
|
66 | 66 | throw new \InvalidArgumentException( |
67 | 67 | sprintf("Proxies destination directory '<info>%s</info>' does not have write permissions.", $destPath) |
68 | 68 | ); |