@@ -56,7 +56,7 @@ |
||
56 | 56 | if (!$skipValidation) { |
57 | 57 | $this->validateEntity($entity); |
58 | 58 | } |
59 | - $this->flush($manager, new ArrayCollection([ $entity ])); |
|
59 | + $this->flush($manager, new ArrayCollection([$entity])); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | protected function flush(ObjectManager $manager, ?ArrayCollection $entities = null): void |
@@ -91,7 +91,7 @@ |
||
91 | 91 | |
92 | 92 | public function __construct( |
93 | 93 | string $username = '', |
94 | - array $roles = [ 'ROLE_USER' ], |
|
94 | + array $roles = ['ROLE_USER'], |
|
95 | 95 | string $password = '', |
96 | 96 | bool $enabled = true |
97 | 97 | ) { |
@@ -83,7 +83,7 @@ |
||
83 | 83 | if ($file->getFilename() === '') { |
84 | 84 | $template = 'The file was not uploaded. It is likely that the file size was larger than %s'; |
85 | 85 | throw new ValidationException(new ConstraintViolationList([ |
86 | - new ConstraintViolation(sprintf($template, ini_get('upload_max_filesize')), $template, [ ini_get('upload_max_filesize') ], $file, 'filename', $file->getFilename()) |
|
86 | + new ConstraintViolation(sprintf($template, ini_get('upload_max_filesize')), $template, [ini_get('upload_max_filesize')], $file, 'filename', $file->getFilename()) |
|
87 | 87 | ])); |
88 | 88 | } |
89 | 89 | $resourceMetadata = $this->resourceMetadataFactory->create(get_class($entity)); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | public static function getSubscribedEvents(): array |
21 | 21 | { |
22 | - return [ Events::JWT_CREATED => 'updateTokenRoles' ]; |
|
22 | + return [Events::JWT_CREATED => 'updateTokenRoles']; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | public function updateTokenRoles(JWTCreatedEvent $event): void |
@@ -79,7 +79,7 @@ |
||
79 | 79 | ] |
80 | 80 | ]; |
81 | 81 | if ($collectionEntity->getPerPage() !== null && ($request = $this->requestStack->getCurrentRequest())) { |
82 | - $request->attributes->set('_api_pagination', [ 'itemsPerPage' => $collectionEntity->getPerPage() ]); |
|
82 | + $request->attributes->set('_api_pagination', ['itemsPerPage' => $collectionEntity->getPerPage()]); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** @var Paginator $collection */ |
@@ -33,7 +33,7 @@ |
||
33 | 33 | private function supportsEntity(ClassMetadata $targetEntity): bool |
34 | 34 | { |
35 | 35 | if (!empty($targetEntity->subClasses)) { |
36 | - $highestSubclass = $targetEntity->subClasses[max(\count($targetEntity->subClasses)-1, 0)]; |
|
36 | + $highestSubclass = $targetEntity->subClasses[max(\count($targetEntity->subClasses) - 1, 0)]; |
|
37 | 37 | return is_subclass_of($highestSubclass, PublishableInterface::class); |
38 | 38 | } |
39 | 39 | $reflection = $targetEntity->getReflectionClass(); |