@@ -18,9 +18,9 @@ |
||
| 18 | 18 | public function getConfig(): array |
| 19 | 19 | { |
| 20 | 20 | return array_replace_recursive( |
| 21 | - require __DIR__ . '/../config/doctrine.config.php', |
|
| 22 | - require __DIR__ . '/../config/console.config.php', |
|
| 23 | - require __DIR__ . '/../config/module.config.php' |
|
| 21 | + require __DIR__.'/../config/doctrine.config.php', |
|
| 22 | + require __DIR__.'/../config/console.config.php', |
|
| 23 | + require __DIR__.'/../config/module.config.php' |
|
| 24 | 24 | ); |
| 25 | 25 | } |
| 26 | 26 | } |
@@ -75,14 +75,14 @@ discard block |
||
| 75 | 75 | ); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - $addMethodName = 'add' . ucfirst($this->name); |
|
| 78 | + $addMethodName = 'add'.ucfirst($this->name); |
|
| 79 | 79 | if (!is_callable([$object, $addMethodName])) { |
| 80 | 80 | throw new InvalidArgumentException( |
| 81 | 81 | sprintf('The \'%s\' method is not callable for entity \'%s\'', $addMethodName, $entityName) |
| 82 | 82 | ); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - $removeMethodName = 'remove' . ucfirst($this->name); |
|
| 85 | + $removeMethodName = 'remove'.ucfirst($this->name); |
|
| 86 | 86 | if (!is_callable([$object, $addMethodName])) { |
| 87 | 87 | throw new InvalidArgumentException( |
| 88 | 88 | sprintf('The \'%s\' method is not callable for entity \'%s\'', $removeMethodName, $entityName) |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | private function resolveEntityCollection(object $object): iterable |
| 116 | 116 | { |
| 117 | - $methodName = 'get' . ucfirst($this->name); |
|
| 117 | + $methodName = 'get'.ucfirst($this->name); |
|
| 118 | 118 | if (!is_callable([$object, $methodName])) { |
| 119 | 119 | throw new InvalidArgumentException( |
| 120 | 120 | sprintf('The method \'%s\' is not callable for entity \'%s\'', $methodName, get_class($object)) |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | - return array_filter($collection, static fn ($item) => null !== $item); |
|
| 217 | + return array_filter($collection, static fn($item) => null !== $item); |
|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | /** |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | public function setCollectionReference(string $name, iterable $collection): void |
| 76 | 76 | { |
| 77 | 77 | foreach ($collection as $index => $item) { |
| 78 | - $itemName = $name . '.' . $index; |
|
| 78 | + $itemName = $name.'.'.$index; |
|
| 79 | 79 | $this->setReference($itemName, $item); |
| 80 | 80 | $this->collectionReferences[$name][$index] = $itemName; |
| 81 | 81 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | |
| 55 | 55 | $hydrator = new EntityHydrator( |
| 56 | 56 | $this->getEntityManager($container, $entityManager, $requestedName), |
| 57 | - isset($options['by_value']) ? (bool)$options['by_value'] : true, |
|
| 57 | + isset($options['by_value']) ? (bool) $options['by_value'] : true, |
|
| 58 | 58 | $inflector |
| 59 | 59 | ); |
| 60 | 60 | |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | { |
| 80 | 80 | $className = $options['class_name'] ?? EntityRepository::class; |
| 81 | 81 | if (empty($options['class_name'])) { |
| 82 | - $generatedClassName = str_replace('Entity', 'Repository', $entityName) . 'Repository'; |
|
| 82 | + $generatedClassName = str_replace('Entity', 'Repository', $entityName).'Repository'; |
|
| 83 | 83 | if ( |
| 84 | 84 | class_exists($generatedClassName, true) |
| 85 | 85 | && is_subclass_of($generatedClassName, EntityRepositoryInterface::class, true) |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | if (!is_callable($eventListener)) { |
| 130 | 130 | throw new ServiceNotCreatedException( |
| 131 | 131 | sprintf( |
| 132 | - 'The event listener registered for event \'%s\' at index \'%d\'' . |
|
| 132 | + 'The event listener registered for event \'%s\' at index \'%d\''. |
|
| 133 | 133 | 'at priority \'%d\' cannot be resolved for \'%s\'', |
| 134 | 134 | $index, |
| 135 | 135 | $eventName, |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $metadata = $this->objectManager->getClassMetadata(ltrim($target, '\\')); |
| 47 | 47 | $identifier = $metadata->getIdentifier(); |
| 48 | 48 | |
| 49 | - if (! is_array($values) && ! $values instanceof \Traversable) { |
|
| 49 | + if (!is_array($values) && !$values instanceof \Traversable) { |
|
| 50 | 50 | $values = (array) $values; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | $find = $this->getFindCriteria($identifier, $value); |
| 70 | 70 | |
| 71 | - if (! empty($find) && $found = $this->find($find, $target)) { |
|
| 71 | + if (!empty($find) && $found = $this->find($find, $target)) { |
|
| 72 | 72 | $collection[] = is_array($value) ? $this->hydrate($value, $found) : $found; |
| 73 | 73 | } else { |
| 74 | 74 | $newTarget = $this->createTargetEntity($target); |
@@ -129,8 +129,8 @@ discard block |
||
| 129 | 129 | continue; |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - $getter = 'get' . ucfirst($fieldName); |
|
| 133 | - $isser = 'is' . ucfirst($fieldName); |
|
| 132 | + $getter = 'get'.ucfirst($fieldName); |
|
| 133 | + $isser = 'is'.ucfirst($fieldName); |
|
| 134 | 134 | |
| 135 | 135 | $dataFieldName = $this->computeExtractFieldName($fieldName); |
| 136 | 136 | if (in_array($getter, $methods, true)) { |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | $find = []; |
| 264 | 264 | foreach ($identifier as $field) { |
| 265 | 265 | if (is_object($value)) { |
| 266 | - $getter = 'get' . ucfirst($field); |
|
| 266 | + $getter = 'get'.ucfirst($field); |
|
| 267 | 267 | |
| 268 | 268 | if (is_callable([$value, $getter])) { |
| 269 | 269 | $find[$field] = $value->$getter(); |