@@ -122,7 +122,7 @@ |
||
122 | 122 | $config, |
123 | 123 | $configuration, |
124 | 124 | $eventManager |
125 | - ): Connection { |
|
125 | + ) : Connection { |
|
126 | 126 | Assert::assertSame($configurationArg, $configuration); |
127 | 127 | Assert::assertSame($eventManagerArg, $eventManager); |
128 | 128 | Assert::assertSame( |
@@ -85,11 +85,11 @@ |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | if (isset($options['auto_exit'])) { |
88 | - $application->setAutoExit((bool)$options['auto_exit']); |
|
88 | + $application->setAutoExit((bool) $options['auto_exit']); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | if (isset($options['catch_exceptions'])) { |
92 | - $application->setCatchExceptions((bool)$options['catch_exceptions']); |
|
92 | + $application->setCatchExceptions((bool) $options['catch_exceptions']); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | if (isset($options['default_command'])) { |
@@ -75,7 +75,7 @@ |
||
75 | 75 | |
76 | 76 | $this->executor->execute( |
77 | 77 | $this->fixtures, |
78 | - (bool)$input->getOption('append') |
|
78 | + (bool) $input->getOption('append') |
|
79 | 79 | ); |
80 | 80 | |
81 | 81 | $output->writeln(sprintf('Completed execution of \'%d\' fixtures', count($this->fixtures))); |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function saveCollection(iterable $collection, array $options = []): iterable |
83 | 83 | { |
84 | - $transaction = (bool)($options['transaction'] ?? true); |
|
85 | - $flush = (bool)($options['flush'] ?? true); |
|
84 | + $transaction = (bool) ($options['transaction'] ?? true); |
|
85 | + $flush = (bool) ($options['flush'] ?? true); |
|
86 | 86 | |
87 | 87 | try { |
88 | 88 | if ($transaction) { |
@@ -140,8 +140,8 @@ discard block |
||
140 | 140 | */ |
141 | 141 | protected function update(EntityInterface $entity, array $options = []): EntityInterface |
142 | 142 | { |
143 | - $transaction = (bool)($options['transaction'] ?? false); |
|
144 | - $flush = (bool)($options['flush'] ?? true); |
|
143 | + $transaction = (bool) ($options['transaction'] ?? false); |
|
144 | + $flush = (bool) ($options['flush'] ?? true); |
|
145 | 145 | |
146 | 146 | try { |
147 | 147 | if ($transaction) { |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | */ |
186 | 186 | protected function insert(EntityInterface $entity, array $options = []): EntityInterface |
187 | 187 | { |
188 | - $transaction = (bool)($options['transaction'] ?? false); |
|
189 | - $flush = (bool)($options['flush'] ?? true); |
|
188 | + $transaction = (bool) ($options['transaction'] ?? false); |
|
189 | + $flush = (bool) ($options['flush'] ?? true); |
|
190 | 190 | |
191 | 191 | try { |
192 | 192 | $this->entityManager->persist($entity); |
@@ -234,8 +234,8 @@ discard block |
||
234 | 234 | */ |
235 | 235 | public function delete(EntityInterface $entity, array $options = []): bool |
236 | 236 | { |
237 | - $transaction = (bool)($options['transaction'] ?? false); |
|
238 | - $flush = (bool)($options['flush'] ?? true); |
|
237 | + $transaction = (bool) ($options['transaction'] ?? false); |
|
238 | + $flush = (bool) ($options['flush'] ?? true); |
|
239 | 239 | |
240 | 240 | try { |
241 | 241 | if ($transaction) { |
@@ -283,8 +283,8 @@ discard block |
||
283 | 283 | */ |
284 | 284 | public function deleteCollection(iterable $collection, array $options = []): int |
285 | 285 | { |
286 | - $transaction = (bool)($options['transaction'] ?? true); |
|
287 | - $flush = (bool)($options['flush'] ?? true); |
|
286 | + $transaction = (bool) ($options['transaction'] ?? true); |
|
287 | + $flush = (bool) ($options['flush'] ?? true); |
|
288 | 288 | |
289 | 289 | try { |
290 | 290 | if ($transaction) { |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | $deletedCount = 0; |
303 | 303 | foreach ($collection as $entity) { |
304 | 304 | if ($this->delete($entity, $saveOptions)) { |
305 | - $deletedCount++; |
|
305 | + $deletedCount ++; |
|
306 | 306 | } |
307 | 307 | } |
308 | 308 |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | * |
303 | 303 | * @throws EntityRepositoryException |
304 | 304 | */ |
305 | - protected function executeQuery(QueryBuilder|AbstractQuery $query, array $options = []): mixed |
|
305 | + protected function executeQuery(QueryBuilder | AbstractQuery $query, array $options = []): mixed |
|
306 | 306 | { |
307 | 307 | try { |
308 | 308 | return $this->queryService->execute($query, $options); |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | * |
323 | 323 | * @throws EntityRepositoryException |
324 | 324 | */ |
325 | - protected function getSingleResultOrNull(AbstractQuery|QueryBuilder $query, array $options = []): ?EntityInterface |
|
325 | + protected function getSingleResultOrNull(AbstractQuery | QueryBuilder $query, array $options = []): ?EntityInterface |
|
326 | 326 | { |
327 | 327 | try { |
328 | 328 | return $this->queryService->getSingleResultOrNull($query, $options); |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | * |
343 | 343 | * @throws EntityRepositoryException |
344 | 344 | */ |
345 | - protected function getSingleArrayResultOrNull(AbstractQuery|QueryBuilder $query, array $options = []): ?array |
|
345 | + protected function getSingleArrayResultOrNull(AbstractQuery | QueryBuilder $query, array $options = []): ?array |
|
346 | 346 | { |
347 | 347 | $options = array_replace_recursive( |
348 | 348 | $options, |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | * |
370 | 370 | * @throws EntityRepositoryException |
371 | 371 | */ |
372 | - protected function getSingleScalarResult(AbstractQuery|QueryBuilder $query, array $options = []): mixed |
|
372 | + protected function getSingleScalarResult(AbstractQuery | QueryBuilder $query, array $options = []): mixed |
|
373 | 373 | { |
374 | 374 | try { |
375 | 375 | return $this->queryService->getSingleScalarResult($query, $options); |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | * @throws QueryServiceException |
47 | 47 | */ |
48 | 48 | public function getSingleResultOrNull( |
49 | - AbstractQuery|QueryBuilder $queryOrBuilder, |
|
49 | + AbstractQuery | QueryBuilder $queryOrBuilder, |
|
50 | 50 | array $options = [] |
51 | - ): EntityInterface|array|null { |
|
51 | + ): EntityInterface | array | null { |
|
52 | 52 | $result = $this->execute($queryOrBuilder, $options); |
53 | 53 | |
54 | 54 | if (empty($result)) { |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | * @throws QueryServiceException |
76 | 76 | */ |
77 | 77 | public function getSingleScalarResult( |
78 | - AbstractQuery|QueryBuilder $queryOrBuilder, |
|
78 | + AbstractQuery | QueryBuilder $queryOrBuilder, |
|
79 | 79 | array $options = [] |
80 | - ): int|float|bool|string|null { |
|
80 | + ): int | float | bool | string | null { |
|
81 | 81 | try { |
82 | 82 | return $this->getQuery($queryOrBuilder, $options)->getSingleScalarResult(); |
83 | 83 | } catch (QueryServiceException $e) { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * |
100 | 100 | * @throws QueryServiceException |
101 | 101 | */ |
102 | - public function execute(AbstractQuery|QueryBuilder $queryOrBuilder, array $options = []): mixed |
|
102 | + public function execute(AbstractQuery | QueryBuilder $queryOrBuilder, array $options = []): mixed |
|
103 | 103 | { |
104 | 104 | try { |
105 | 105 | return $this->getQuery($queryOrBuilder, $options)->execute(); |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | * |
288 | 288 | * @throws QueryServiceException |
289 | 289 | */ |
290 | - private function getQuery(AbstractQuery|QueryBuilder $queryOrBuilder, array $options = []): AbstractQuery |
|
290 | + private function getQuery(AbstractQuery | QueryBuilder $queryOrBuilder, array $options = []): AbstractQuery |
|
291 | 291 | { |
292 | 292 | if ($queryOrBuilder instanceof QueryBuilder) { |
293 | 293 | $queryOrBuilder = $this->prepareQueryBuilder($queryOrBuilder, $options)->getQuery(); |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | * @throws Exception\QueryServiceException |
57 | 57 | */ |
58 | 58 | public function getSingleResultOrNull( |
59 | - AbstractQuery|QueryBuilder $queryOrBuilder, |
|
59 | + AbstractQuery | QueryBuilder $queryOrBuilder, |
|
60 | 60 | array $options = [] |
61 | - ): EntityInterface|array|null; |
|
61 | + ): EntityInterface | array | null; |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * @param AbstractQuery|QueryBuilder $queryOrBuilder |
@@ -69,16 +69,16 @@ discard block |
||
69 | 69 | * @throws Exception\QueryServiceException |
70 | 70 | */ |
71 | 71 | public function getSingleScalarResult( |
72 | - AbstractQuery|QueryBuilder $queryOrBuilder, |
|
72 | + AbstractQuery | QueryBuilder $queryOrBuilder, |
|
73 | 73 | array $options = [] |
74 | - ): int|float|bool|string|null; |
|
74 | + ): int | float | bool | string | null; |
|
75 | 75 | |
76 | 76 | /** |
77 | 77 | * @param array<string, mixed> $options |
78 | 78 | * |
79 | 79 | * @throws Exception\QueryServiceException |
80 | 80 | */ |
81 | - public function execute(AbstractQuery|QueryBuilder $queryOrBuilder, array $options = []): mixed; |
|
81 | + public function execute(AbstractQuery | QueryBuilder $queryOrBuilder, array $options = []): mixed; |
|
82 | 82 | |
83 | 83 | /** |
84 | 84 | * @param array<string, mixed> $criteria |
@@ -11,6 +11,6 @@ |
||
11 | 11 | { |
12 | 12 | public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?int |
13 | 13 | { |
14 | - return $value === null ? null : (int)$value; |
|
14 | + return $value === null ? null : (int) $value; |
|
15 | 15 | } |
16 | 16 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | protected function toMany($object, $collectionName, $target, $values): void |
44 | 44 | { |
45 | 45 | if (!is_iterable($values)) { |
46 | - $values = (array)$values; |
|
46 | + $values = (array) $values; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | $metadata = $this->objectManager->getClassMetadata($target); |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | protected function handleTypeConversions($value, $typeOfField): mixed |
293 | 293 | { |
294 | 294 | if ($value !== null && $typeOfField === 'bigint') { |
295 | - return (int)$value; |
|
295 | + return (int) $value; |
|
296 | 296 | } |
297 | 297 | return parent::handleTypeConversions($value, $typeOfField); |
298 | 298 | } |