@@ -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 | /** |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $metadata = $this->objectManager->getClassMetadata(ltrim($target, '\\')); |
40 | 40 | $identifier = $metadata->getIdentifier(); |
41 | 41 | |
42 | - if (! is_array($values) && ! $values instanceof \Traversable) { |
|
42 | + if (!is_array($values) && !$values instanceof \Traversable) { |
|
43 | 43 | $values = (array) $values; |
44 | 44 | } |
45 | 45 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | foreach ($identifier as $field) { |
65 | 65 | switch (gettype($value)) { |
66 | 66 | case 'object': |
67 | - $getter = 'get' . ucfirst($field); |
|
67 | + $getter = 'get'.ucfirst($field); |
|
68 | 68 | |
69 | 69 | if (is_callable([$value, $getter])) { |
70 | 70 | $find[$field] = $value->$getter(); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
88 | - if (! empty($find) && $found = $this->find($find, $target)) { |
|
88 | + if (!empty($find) && $found = $this->find($find, $target)) { |
|
89 | 89 | $collection[] = (is_array($value)) ? $this->hydrate($value, $found) : $found; |
90 | 90 | } else { |
91 | 91 | $newTarget = $this->createTargetEntity($target); |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | continue; |
147 | 147 | } |
148 | 148 | |
149 | - $getter = 'get' . ucfirst($fieldName); |
|
150 | - $isser = 'is' . ucfirst($fieldName); |
|
149 | + $getter = 'get'.ucfirst($fieldName); |
|
150 | + $isser = 'is'.ucfirst($fieldName); |
|
151 | 151 | |
152 | 152 | $dataFieldName = $this->computeExtractFieldName($fieldName); |
153 | 153 | if (in_array($getter, $methods, true)) { |
@@ -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, |