Skip to content

Commit b4eb806

Browse files
committed
Fix findings from PHP CS Fixer
1 parent 77cfbbc commit b4eb806

File tree

12 files changed

+58
-58
lines changed

12 files changed

+58
-58
lines changed

src/Loggable/Document/Repository/LogEntryRepository.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ class LogEntryRepository extends DocumentRepository
4343
*
4444
* @param object $document
4545
*
46-
* @return LogEntry[]
47-
*
4846
* @phpstan-param T $document
4947
*
48+
* @return LogEntry[]
49+
*
5050
* @phpstan-return array<array-key, LogEntry<T>>
5151
*/
5252
public function getLogEntries($document)
@@ -71,11 +71,11 @@ public function getLogEntries($document)
7171
* @param object $document
7272
* @param int $version
7373
*
74+
* @phpstan-param T $document
75+
*
7476
* @throws UnexpectedValueException
7577
*
7678
* @return void
77-
*
78-
* @phpstan-param T $document
7979
*/
8080
public function revert($document, $version = 1)
8181
{
@@ -109,9 +109,9 @@ public function revert($document, $version = 1)
109109
* @param object $document
110110
* @param array<string, mixed> $data
111111
*
112-
* @return void
113-
*
114112
* @phpstan-param T $document
113+
*
114+
* @return void
115115
*/
116116
protected function fillDocument($document, array $data)
117117
{

src/Loggable/LoggableListener.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@ protected function getUsername(): ?string
285285
* @param LogEntryInterface $logEntry The LogEntry being persisted
286286
* @param object $object The object being Logged
287287
*
288-
* @return void
289-
*
290288
* @phpstan-param LogEntryInterface<T> $logEntry
291289
* @phpstan-param T $object
290+
*
291+
* @return void
292292
*/
293293
protected function prePersistLogEntry($logEntry, $object)
294294
{
@@ -306,10 +306,10 @@ protected function getNamespace()
306306
* @param object $object
307307
* @param LogEntryInterface $logEntry
308308
*
309-
* @return array<string, mixed>
310-
*
311309
* @phpstan-param T $object
312310
* @phpstan-param LogEntryInterface<T> $logEntry
311+
*
312+
* @return array<string, mixed>
313313
*/
314314
protected function getObjectChangeSetData($ea, $object, $logEntry)
315315
{
@@ -352,11 +352,11 @@ protected function getObjectChangeSetData($ea, $object, $logEntry)
352352
* @param string $action
353353
* @param object $object
354354
*
355-
* @return LogEntryInterface|null
356-
*
357355
* @phpstan-param LogEntryInterface::ACTION_CREATE|LogEntryInterface::ACTION_UPDATE|LogEntryInterface::ACTION_REMOVE $action
358356
* @phpstan-param T $object
359357
*
358+
* @return LogEntryInterface|null
359+
*
360360
* @phpstan-return LogEntryInterface<T>|null
361361
*/
362362
protected function createLogEntry($action, $object, LoggableAdapter $ea)

src/Mapping/Driver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ interface Driver
3131
* @param ClassMetadata<T> $meta
3232
* @param array<string, mixed> $config
3333
*
34-
* @throws InvalidMappingException if the mapping configuration is invalid
35-
*
36-
* @return void
37-
*
3834
* @template T of object
3935
*
4036
* @phpstan-param ClassMetadata<T>&(OdmClassMetadata<T>|OrmClassMetadata<T>) $meta
37+
*
38+
* @throws InvalidMappingException if the mapping configuration is invalid
39+
*
40+
* @return void
4141
*/
4242
public function readExtendedMetadata($meta, array &$config);
4343

src/Mapping/Driver/AbstractAnnotationDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ protected function isValidField($meta, $field)
139139
* @param ClassMetadata<object> $metadata the mapped class metadata
140140
* @param string $name the related object class name
141141
*
142-
* @return string related class name or empty string if does not exist
143-
*
144142
* @phpstan-param class-string|string $name
145143
*
144+
* @return string related class name or empty string if does not exist
145+
*
146146
* @phpstan-return class-string|''
147147
*/
148148
protected function getRelatedClassName($metadata, $name)

src/Mapping/Driver/File.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ abstract protected function _loadMappingFile($file);
114114
*
115115
* @param string $className
116116
*
117-
* @return array<string, mixed>|object|null
118-
*
119117
* @phpstan-param class-string $className
118+
*
119+
* @return array<string, mixed>|object|null
120120
*/
121121
protected function _getMapping($className)
122122
{
@@ -143,10 +143,10 @@ protected function _getMapping($className)
143143
* @param ClassMetadata<object> $metadata the mapped class metadata
144144
* @param string $name the related object class name
145145
*
146-
* @return string related class name or empty string if does not exist
147-
*
148146
* @phpstan-param class-string|string $name
149147
*
148+
* @return string related class name or empty string if does not exist
149+
*
150150
* @phpstan-return class-string|''
151151
*/
152152
protected function getRelatedClassName($metadata, $name)

src/Tool/ORM/Repository/EntityRepositoryCompat.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public function __call(string $method, array $args): mixed
3434
* @param string $method
3535
* @param array $args
3636
*
37-
* @return mixed
38-
*
3937
* @phpstan-param list<mixed> $args
38+
*
39+
* @return mixed
4040
*/
4141
abstract protected function doCallWithCompat($method, $args);
4242
}
@@ -55,9 +55,9 @@ trait EntityRepositoryCompat
5555
* @param string $method
5656
* @param array $args
5757
*
58-
* @return mixed
59-
*
6058
* @phpstan-param list<mixed> $args
59+
*
60+
* @return mixed
6161
*/
6262
public function __call($method, $args)
6363
{
@@ -68,9 +68,9 @@ public function __call($method, $args)
6868
* @param string $method
6969
* @param array $args
7070
*
71-
* @return mixed
72-
*
7371
* @phpstan-param list<mixed> $args
72+
*
73+
* @return mixed
7474
*/
7575
abstract protected function doCallWithCompat($method, $args);
7676
}

src/Translator/TranslationProxy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ class TranslationProxy
4949
* @param string[] $properties object properties to translate
5050
* @param string $class translation entity|document class
5151
*
52-
* @throws \InvalidArgumentException Translation class doesn't implement TranslationInterface
53-
*
5452
* @phpstan-param class-string<TranslationInterface> $class
5553
* @phpstan-param Collection<int, TranslationInterface> $coll
54+
*
55+
* @throws \InvalidArgumentException Translation class doesn't implement TranslationInterface
5656
*/
5757
public function __construct($translatable, $locale, array $properties, $class, Collection $coll)
5858
{

src/Tree/Entity/Repository/AbstractTreeRepository.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ abstract public function getNodesHierarchyQuery($node = null, $direct = false, a
223223
* @param string|string[] $direction Sort order ('asc'|'desc'|'ASC'|'DESC'). If $sortByField is an array, this may also be an array with matching number of elements
224224
* @param bool $includeNode Include the root node in results?
225225
*
226-
* @return QueryBuilder QueryBuilder object
227-
*
228226
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC'|array<int, 'asc'|'desc'|'ASC'|'DESC'> $direction
227+
*
228+
* @return QueryBuilder QueryBuilder object
229229
*/
230230
abstract public function getChildrenQueryBuilder($node = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false);
231231

@@ -238,9 +238,9 @@ abstract public function getChildrenQueryBuilder($node = null, $direct = false,
238238
* @param string|string[] $direction Sort order ('asc'|'desc'|'ASC'|'DESC'). If $sortByField is an array, this may also be an array with matching number of elements
239239
* @param bool $includeNode Include the root node in results?
240240
*
241-
* @return Query Query object
242-
*
243241
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC'|array<int, 'asc'|'desc'|'ASC'|'DESC'> $direction
242+
*
243+
* @return Query Query object
244244
*/
245245
abstract public function getChildrenQuery($node = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false);
246246

src/Tree/Entity/Repository/ClosureTreeRepository.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ public function getPath($node)
116116
* @param string|string[] $direction Sort order ('asc'|'desc'|'ASC'|'DESC'). If $sortByField is an array, this may also be an array with matching number of elements
117117
* @param bool $includeNode Include the root node in results?
118118
*
119-
* @return QueryBuilder QueryBuilder object
120-
*
121119
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC'|array<int, 'asc'|'desc'|'ASC'|'DESC'> $direction
120+
*
121+
* @return QueryBuilder QueryBuilder object
122122
*/
123123
public function childrenQueryBuilder($node = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false)
124124
{
@@ -193,9 +193,9 @@ public function childrenQueryBuilder($node = null, $direct = false, $sortByField
193193
* @param string|string[] $direction Sort order ('asc'|'desc'|'ASC'|'DESC'). If $sortByField is an array, this may also be an array with matching number of elements
194194
* @param bool $includeNode Include the root node in results?
195195
*
196-
* @return Query Query object
197-
*
198196
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC'|array<int, 'asc'|'desc'|'ASC'|'DESC'> $direction
197+
*
198+
* @return Query Query object
199199
*/
200200
public function childrenQuery($node = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false)
201201
{
@@ -209,9 +209,9 @@ public function childrenQuery($node = null, $direct = false, $sortByField = null
209209
* @param string|string[] $direction Sort order ('asc'|'desc'|'ASC'|'DESC'). If $sortByField is an array, this may also be an array with matching number of elements
210210
* @param bool $includeNode Include the root node in results?
211211
*
212-
* @return array<int, object|null> List of children or null on failure
213-
*
214212
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC'|array<int, 'asc'|'desc'|'ASC'|'DESC'> $direction
213+
*
214+
* @return array<int, object|null> List of children or null on failure
215215
*/
216216
public function children($node = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false)
217217
{

src/Tree/Entity/Repository/NestedTreeRepository.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ public function getPathAsString(object $node, array $options = []): string
233233
* @param string|string[] $direction Sort order ('asc'|'desc'|'ASC'|'DESC'). If $sortByField is an array, this may also be an array with matching number of elements
234234
* @param bool $includeNode Include the root node in results?
235235
*
236-
* @return QueryBuilder QueryBuilder object
237-
*
238236
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC'|array<int, 'asc'|'desc'|'ASC'|'DESC'> $direction
237+
*
238+
* @return QueryBuilder QueryBuilder object
239239
*/
240240
public function childrenQueryBuilder($node = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false)
241241
{
@@ -309,9 +309,9 @@ public function childrenQueryBuilder($node = null, $direct = false, $sortByField
309309
* @param string|string[] $direction Sort order ('asc'|'desc'|'ASC'|'DESC'). If $sortByField is an array, this may also be an array with matching number of elements
310310
* @param bool $includeNode Include the root node in results?
311311
*
312-
* @return Query Query object
313-
*
314312
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC'|array<int, 'asc'|'desc'|'ASC'|'DESC'> $direction
313+
*
314+
* @return Query Query object
315315
*/
316316
public function childrenQuery($node = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false)
317317
{
@@ -325,9 +325,9 @@ public function childrenQuery($node = null, $direct = false, $sortByField = null
325325
* @param string|string[] $direction Sort order ('asc'|'desc'|'ASC'|'DESC'). If $sortByField is an array, this may also be an array with matching number of elements
326326
* @param bool $includeNode Flag indicating whether the given node should be included in the results
327327
*
328-
* @return array<int, object> List of children
329-
*
330328
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC'|array<int, 'asc'|'desc'|'ASC'|'DESC'> $direction
329+
*
330+
* @return array<int, object> List of children
331331
*/
332332
public function children($node = null, $direct = false, $sortByField = null, $direction = 'ASC', $includeNode = false)
333333
{
@@ -359,11 +359,11 @@ public function getChildren($node = null, $direct = false, $sortByField = null,
359359
* @param string $sortByField field name to sort by
360360
* @param string $direction sort direction : "ASC" or "DESC"
361361
*
362+
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC' $direction
363+
*
362364
* @throws InvalidArgumentException if input is not valid
363365
*
364366
* @return QueryBuilder
365-
*
366-
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC' $direction
367367
*/
368368
public function getLeafsQueryBuilder($root = null, $sortByField = null, $direction = 'ASC')
369369
{
@@ -415,9 +415,9 @@ public function getLeafsQueryBuilder($root = null, $sortByField = null, $directi
415415
* @param string $sortByField field name to sort by
416416
* @param string $direction sort direction : "ASC" or "DESC"
417417
*
418-
* @return Query
419-
*
420418
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC' $direction
419+
*
420+
* @return Query
421421
*/
422422
public function getLeafsQuery($root = null, $sortByField = null, $direction = 'ASC')
423423
{
@@ -431,9 +431,9 @@ public function getLeafsQuery($root = null, $sortByField = null, $direction = 'A
431431
* @param string $sortByField field name to sort by
432432
* @param string $direction sort direction : "ASC" or "DESC"
433433
*
434-
* @return array<int, object>
435-
*
436434
* @phpstan-param 'asc'|'desc'|'ASC'|'DESC' $direction
435+
*
436+
* @return array<int, object>
437437
*/
438438
public function getLeafs($root = null, $sortByField = null, $direction = 'ASC')
439439
{

0 commit comments

Comments
 (0)