@@ -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 | |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | $output->writeln('<comment>[Mapping] Skipped mapping check.</comment>'); |
64 | 64 | } elseif ($errors = $validator->validateMapping()) { |
65 | 65 | foreach ($errors as $className => $errorMessages) { |
66 | - $output->writeln("<error>[Mapping] FAIL - The entity-class '" . $className . "' mapping is invalid:</error>"); |
|
66 | + $output->writeln("<error>[Mapping] FAIL - The entity-class '".$className."' mapping is invalid:</error>"); |
|
67 | 67 | |
68 | 68 | foreach ($errorMessages as $errorMessage) { |
69 | - $output->writeln('* ' . $errorMessage); |
|
69 | + $output->writeln('* '.$errorMessage); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | $output->writeln(''); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | if ($input->getOption('skip-sync')) { |
81 | 81 | $output->writeln('<comment>[Database] SKIPPED - The database was not checked for synchronicity.</comment>'); |
82 | - } elseif (!$validator->schemaInSyncWithMetadata()) { |
|
82 | + } elseif ( ! $validator->schemaInSyncWithMetadata()) { |
|
83 | 83 | $output->writeln('<error>[Database] FAIL - The database schema is not in sync with the current mapping file.</error>'); |
84 | 84 | $exit += 2; |
85 | 85 | } else { |
@@ -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 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | if ($numRepositories) { |
99 | 99 | // Outputting information message |
100 | - $output->writeln(PHP_EOL . sprintf('Repository classes generated to "<info>%s</INFO>"', $destPath)); |
|
100 | + $output->writeln(PHP_EOL.sprintf('Repository classes generated to "<info>%s</INFO>"', $destPath)); |
|
101 | 101 | } else { |
102 | 102 | $output->writeln('No Repository classes were found to be processed.'); |
103 | 103 | } |
@@ -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 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $exporter->setMetadata($metadata); |
165 | 165 | $exporter->export(); |
166 | 166 | |
167 | - $output->writeln(PHP_EOL . sprintf( |
|
167 | + $output->writeln(PHP_EOL.sprintf( |
|
168 | 168 | 'Exporting "<info>%s</info>" mapping information to "<info>%s</info>"', $toType, $destPath |
169 | 169 | )); |
170 | 170 | } else { |
@@ -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; |
6 | 6 | |
@@ -21,6 +21,6 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public static function schemaToolFailure($sql, \Exception $e) |
23 | 23 | { |
24 | - return new self("Schema-Tool failed with Error '" . $e->getMessage() . "' while executing DDL: " . $sql, 0, $e); |
|
24 | + return new self("Schema-Tool failed with Error '".$e->getMessage()."' while executing DDL: ".$sql, 0, $e); |
|
25 | 25 | } |
26 | 26 | } |
@@ -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 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public static function namedQueryNotFound($queryName) |
33 | 33 | { |
34 | - return new self('Could not find a named query by the name "' . $queryName . '"'); |
|
34 | + return new self('Could not find a named query by the name "'.$queryName.'"'); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public static function namedNativeQueryNotFound($nativeQueryName) |
43 | 43 | { |
44 | - return new self('Could not find a named native query by the name "' . $nativeQueryName . '"'); |
|
44 | + return new self('Could not find a named native query by the name "'.$nativeQueryName.'"'); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | public static function entityMissingForeignAssignedId($entity, $relatedEntity) |
54 | 54 | { |
55 | 55 | return new self( |
56 | - "Entity of type " . get_class($entity) . " has identity through a foreign entity " . get_class($relatedEntity) . ", " . |
|
57 | - "however this entity has no identity itself. You have to call EntityManager#persist() on the related entity " . |
|
58 | - "and make sure that an identifier was generated before trying to persist '" . get_class($entity) . "'. In case " . |
|
59 | - "of Post Insert ID Generation (such as MySQL Auto-Increment) this means you have to call " . |
|
56 | + "Entity of type ".get_class($entity)." has identity through a foreign entity ".get_class($relatedEntity).", ". |
|
57 | + "however this entity has no identity itself. You have to call EntityManager#persist() on the related entity ". |
|
58 | + "and make sure that an identifier was generated before trying to persist '".get_class($entity)."'. In case ". |
|
59 | + "of Post Insert ID Generation (such as MySQL Auto-Increment) this means you have to call ". |
|
60 | 60 | "EntityManager#flush() between both persist operations." |
61 | 61 | ); |
62 | 62 | } |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public static function entityMissingAssignedIdForField($entity, $field) |
71 | 71 | { |
72 | - return new self("Entity of type " . get_class($entity) . " is missing an assigned ID for field '" . $field . "'. " . |
|
72 | + return new self("Entity of type ".get_class($entity)." is missing an assigned ID for field '".$field."'. ". |
|
73 | 73 | "The identifier generation strategy for this entity requires the ID field to be populated before ". |
74 | - "EntityManager#persist() is called. If you want automatically generated identifiers instead " . |
|
74 | + "EntityManager#persist() is called. If you want automatically generated identifiers instead ". |
|
75 | 75 | "you need to adjust the metadata mapping accordingly." |
76 | 76 | ); |
77 | 77 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public static function invalidOrientation($className, $field) |
110 | 110 | { |
111 | - return new self("Invalid order by orientation specified for " . $className . "#" . $field); |
|
111 | + return new self("Invalid order by orientation specified for ".$className."#".$field); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | */ |
241 | 241 | public static function queryCacheUsesNonPersistentCache(CacheDriver $cache) |
242 | 242 | { |
243 | - return new self('Query Cache uses a non-persistent cache driver, ' . get_class($cache) . '.'); |
|
243 | + return new self('Query Cache uses a non-persistent cache driver, '.get_class($cache).'.'); |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | /** |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | */ |
251 | 251 | public static function metadataCacheUsesNonPersistentCache(CacheDriver $cache) |
252 | 252 | { |
253 | - return new self('Metadata Cache uses a non-persistent cache driver, ' . get_class($cache) . '.'); |
|
253 | + return new self('Metadata Cache uses a non-persistent cache driver, '.get_class($cache).'.'); |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | /** |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | */ |
292 | 292 | public static function missingIdentifierField($className, $fieldName) |
293 | 293 | { |
294 | - return new self("The identifier $fieldName is missing for a query of " . $className); |
|
294 | + return new self("The identifier $fieldName is missing for a query of ".$className); |
|
295 | 295 | } |
296 | 296 | |
297 | 297 | /** |
@@ -303,8 +303,8 @@ discard block |
||
303 | 303 | public static function unrecognizedIdentifierFields($className, $fieldNames) |
304 | 304 | { |
305 | 305 | return new self( |
306 | - "Unrecognized identifier fields: '" . implode("', '", $fieldNames) . "' " . |
|
307 | - "are not present on class '" . $className . "'." |
|
306 | + "Unrecognized identifier fields: '".implode("', '", $fieldNames)."' ". |
|
307 | + "are not present on class '".$className."'." |
|
308 | 308 | ); |
309 | 309 | } |
310 | 310 |
@@ -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 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $expectedLockVersion = ($expectedLockVersion instanceof \DateTime) ? $expectedLockVersion->getTimestamp() : $expectedLockVersion; |
62 | 62 | $actualLockVersion = ($actualLockVersion instanceof \DateTime) ? $actualLockVersion->getTimestamp() : $actualLockVersion; |
63 | 63 | |
64 | - return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion, $entity); |
|
64 | + return new self("The optimistic lock failed, version ".$expectedLockVersion." was expected, but is actually ".$actualLockVersion, $entity); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public static function notVersioned($entityName) |
73 | 73 | { |
74 | - return new self("Cannot obtain optimistic lock on unversioned entity " . $entityName, null); |
|
74 | + return new self("Cannot obtain optimistic lock on unversioned entity ".$entityName, null); |
|
75 | 75 | } |
76 | 76 | } |
@@ -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 | |
@@ -292,14 +292,14 @@ discard block |
||
292 | 292 | */ |
293 | 293 | private function resolveMagicCall($method, $by, array $arguments) |
294 | 294 | { |
295 | - if (! $arguments) { |
|
296 | - throw ORMException::findByRequiresParameter($method . $by); |
|
295 | + if ( ! $arguments) { |
|
296 | + throw ORMException::findByRequiresParameter($method.$by); |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | $fieldName = lcfirst(Inflector::classify($by)); |
300 | 300 | |
301 | 301 | if (null === $this->class->getProperty($fieldName)) { |
302 | - throw ORMException::invalidMagicCall($this->entityName, $fieldName, $method . $by); |
|
302 | + throw ORMException::invalidMagicCall($this->entityName, $fieldName, $method.$by); |
|
303 | 303 | } |
304 | 304 | |
305 | 305 | return $this->$method([$fieldName => $arguments[0]], ...array_slice($arguments, 1)); |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Sequencing; |
7 | 7 |
@@ -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\Sequencing; |
6 | 6 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $this->tableName, $this->sequenceName, $this->allocationSize |
78 | 78 | ); |
79 | 79 | |
80 | - if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel+1]) !== 1) { |
|
80 | + if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel + 1]) !== 1) { |
|
81 | 81 | // no affected rows, concurrency issue, throw exception |
82 | 82 | } |
83 | 83 | } else { |