@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | protected function toMany($object, $collectionName, $target, $values): void |
| 43 | 43 | { |
| 44 | 44 | if (!is_iterable($values)) { |
| 45 | - $values = (array)$values; |
|
| 45 | + $values = (array) $values; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $metadata = $this->objectManager->getClassMetadata($target); |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | if ($value !== null && $typeOfField === 'bigint') { |
| 287 | - return (int)$value; |
|
| 287 | + return (int) $value; |
|
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | return parent::handleTypeConversions($value, $typeOfField); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * @throws ServiceNotFoundException |
| 68 | 68 | * @throws ContainerExceptionInterface |
| 69 | 69 | */ |
| 70 | - private function getReader(ContainerInterface $container, string|Reader $reader, string $serviceName): Reader |
|
| 70 | + private function getReader(ContainerInterface $container, string | Reader $reader, string $serviceName): Reader |
|
| 71 | 71 | { |
| 72 | 72 | if (is_string($reader)) { |
| 73 | 73 | $reader = $this->getService($container, $reader, $serviceName); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | private function getCache( |
| 96 | 96 | ServiceLocatorInterface $container, |
| 97 | - string|CacheItemPoolInterface $cache, |
|
| 97 | + string | CacheItemPoolInterface $cache, |
|
| 98 | 98 | string $serviceName |
| 99 | 99 | ): CacheItemPoolInterface { |
| 100 | 100 | if (is_string($cache)) { |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | private function getConnection( |
| 85 | 85 | ContainerInterface $container, |
| 86 | - string|array|Connection $connection, |
|
| 86 | + string | array | Connection $connection, |
|
| 87 | 87 | string $serviceName |
| 88 | 88 | ): Connection { |
| 89 | 89 | if ($connection instanceof Connection) { |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | private function getConfiguration( |
| 148 | 148 | ServiceLocatorInterface $container, |
| 149 | - string|array|Configuration $configuration, |
|
| 149 | + string | array | Configuration $configuration, |
|
| 150 | 150 | string $serviceName |
| 151 | 151 | ): Configuration { |
| 152 | 152 | if (is_object($configuration)) { |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | */ |
| 208 | 208 | private function getEventManager( |
| 209 | 209 | ContainerInterface $container, |
| 210 | - string|EventManager|null $eventManager, |
|
| 210 | + string | EventManager | null $eventManager, |
|
| 211 | 211 | string $serviceName |
| 212 | 212 | ): EventManager { |
| 213 | 213 | $eventManager ??= new EventManager(); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | return new PsrCachedReader( |
| 47 | 47 | $this->getReader($container, $reader, $requestedName), |
| 48 | 48 | $this->getCache($container, $cache, $requestedName), |
| 49 | - (bool)($options['debug'] ?? false), |
|
| 49 | + (bool) ($options['debug'] ?? false), |
|
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * @throws ServiceNotCreatedException |
| 56 | 56 | * @throws ServiceNotFoundException |
| 57 | 57 | */ |
| 58 | - private function getReader(ContainerInterface $container, Reader|string $reader, string $requestedName): Reader |
|
| 58 | + private function getReader(ContainerInterface $container, Reader | string $reader, string $requestedName): Reader |
|
| 59 | 59 | { |
| 60 | 60 | if ($reader instanceof Reader) { |
| 61 | 61 | return $reader; |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | * @throws ServiceNotFoundException |
| 85 | 85 | */ |
| 86 | 86 | private function getCache( |
| 87 | - ContainerInterface|ServiceLocatorInterface $container, |
|
| 88 | - string|array|CacheItemPoolInterface $cache, |
|
| 87 | + ContainerInterface | ServiceLocatorInterface $container, |
|
| 88 | + string | array | CacheItemPoolInterface $cache, |
|
| 89 | 89 | string $requestedName |
| 90 | 90 | ): CacheItemPoolInterface { |
| 91 | 91 | if (is_string($cache) && $container->has($cache)) { |
@@ -55,8 +55,8 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function saveCollection(iterable $collection, array $options = []): iterable |
| 57 | 57 | { |
| 58 | - $transaction = (bool)($options['transaction'] ?? true); |
|
| 59 | - $flush = (bool)($options['flush'] ?? true); |
|
| 58 | + $transaction = (bool) ($options['transaction'] ?? true); |
|
| 59 | + $flush = (bool) ($options['flush'] ?? true); |
|
| 60 | 60 | |
| 61 | 61 | try { |
| 62 | 62 | if ($transaction) { |
@@ -111,8 +111,8 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | protected function update(EntityInterface $entity, array $options = []): EntityInterface |
| 113 | 113 | { |
| 114 | - $transaction = (bool)($options['transaction'] ?? false); |
|
| 115 | - $flush = (bool)($options['flush'] ?? true); |
|
| 114 | + $transaction = (bool) ($options['transaction'] ?? false); |
|
| 115 | + $flush = (bool) ($options['flush'] ?? true); |
|
| 116 | 116 | |
| 117 | 117 | try { |
| 118 | 118 | if ($transaction) { |
@@ -153,8 +153,8 @@ discard block |
||
| 153 | 153 | */ |
| 154 | 154 | protected function insert(EntityInterface $entity, array $options = []): EntityInterface |
| 155 | 155 | { |
| 156 | - $transaction = (bool)($options['transaction'] ?? false); |
|
| 157 | - $flush = (bool)($options['flush'] ?? true); |
|
| 156 | + $transaction = (bool) ($options['transaction'] ?? false); |
|
| 157 | + $flush = (bool) ($options['flush'] ?? true); |
|
| 158 | 158 | |
| 159 | 159 | try { |
| 160 | 160 | $this->entityManager->persist($entity); |
@@ -199,8 +199,8 @@ discard block |
||
| 199 | 199 | */ |
| 200 | 200 | public function delete(EntityInterface $entity, array $options = []): bool |
| 201 | 201 | { |
| 202 | - $transaction = (bool)($options['transaction'] ?? false); |
|
| 203 | - $flush = (bool)($options['flush'] ?? true); |
|
| 202 | + $transaction = (bool) ($options['transaction'] ?? false); |
|
| 203 | + $flush = (bool) ($options['flush'] ?? true); |
|
| 204 | 204 | |
| 205 | 205 | try { |
| 206 | 206 | if ($transaction) { |
@@ -246,8 +246,8 @@ discard block |
||
| 246 | 246 | */ |
| 247 | 247 | public function deleteCollection(iterable $collection, array $options = []): int |
| 248 | 248 | { |
| 249 | - $transaction = (bool)($options['transaction'] ?? true); |
|
| 250 | - $flush = (bool)($options['flush'] ?? true); |
|
| 249 | + $transaction = (bool) ($options['transaction'] ?? true); |
|
| 250 | + $flush = (bool) ($options['flush'] ?? true); |
|
| 251 | 251 | |
| 252 | 252 | try { |
| 253 | 253 | if ($transaction) { |
@@ -72,11 +72,11 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | if (isset($options['auto_exit'])) { |
| 75 | - $application->setAutoExit((bool)$options['auto_exit']); |
|
| 75 | + $application->setAutoExit((bool) $options['auto_exit']); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | if (isset($options['catch_exceptions'])) { |
| 79 | - $application->setCatchExceptions((bool)$options['catch_exceptions']); |
|
| 79 | + $application->setCatchExceptions((bool) $options['catch_exceptions']); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | if (isset($options['default_command'])) { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | private function getCommandLoader( |
| 104 | 104 | ContainerInterface $container, |
| 105 | - CommandLoaderInterface|string $commandLoader, |
|
| 105 | + CommandLoaderInterface | string $commandLoader, |
|
| 106 | 106 | string $serviceName |
| 107 | 107 | ): CommandLoaderInterface { |
| 108 | 108 | if (is_string($commandLoader)) { |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | /** |
| 60 | 60 | * @throws ServiceNotCreatedException |
| 61 | 61 | */ |
| 62 | - private function resolveConnection(ContainerInterface $container, string $serviceName): Connection|string|null |
|
| 62 | + private function resolveConnection(ContainerInterface $container, string $serviceName): Connection | string | null |
|
| 63 | 63 | { |
| 64 | 64 | try { |
| 65 | 65 | $arguments = new ArgvInput(); |