@@ -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 | /** |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | */ |
| 281 | 281 | public static function invalidEntityRepository($className) |
| 282 | 282 | { |
| 283 | - return new self("Invalid repository class '" . $className . "'. It must be a " . EntityRepositoryInterface::class . '.'); |
|
| 283 | + return new self("Invalid repository class '".$className."'. It must be a ".EntityRepositoryInterface::class.'.'); |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /** |
@@ -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\Repository; |
| 6 | 6 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function getRepository(EntityManagerInterface $entityManager, string $entityName) : EntityRepositoryInterface |
| 29 | 29 | { |
| 30 | - $repositoryHash = $entityManager->getClassMetadata($entityName)->getClassName() . spl_object_id($entityManager); |
|
| 30 | + $repositoryHash = $entityManager->getClassMetadata($entityName)->getClassName().spl_object_id($entityManager); |
|
| 31 | 31 | |
| 32 | 32 | if (isset($this->repositoryList[$repositoryHash])) { |
| 33 | 33 | return $this->repositoryList[$repositoryHash]; |
@@ -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 | |
@@ -224,14 +224,14 @@ discard block |
||
| 224 | 224 | */ |
| 225 | 225 | private function resolveMagicCall(string $method, string $by, array $arguments) |
| 226 | 226 | { |
| 227 | - if (! $arguments) { |
|
| 228 | - throw ORMException::findByRequiresParameter($method . $by); |
|
| 227 | + if ( ! $arguments) { |
|
| 228 | + throw ORMException::findByRequiresParameter($method.$by); |
|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | $fieldName = lcfirst(Inflector::classify($by)); |
| 232 | 232 | |
| 233 | 233 | if (null === $this->class->getProperty($fieldName)) { |
| 234 | - throw ORMException::invalidMagicCall($this->entityName, $fieldName, $method . $by); |
|
| 234 | + throw ORMException::invalidMagicCall($this->entityName, $fieldName, $method.$by); |
|
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | return $this->$method([$fieldName => $arguments[0]], ...array_slice($arguments, 1)); |
@@ -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; |
| 6 | 6 | |