@@ -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 |
@@ -83,7 +83,7 @@ |
||
83 | 83 | |
84 | 84 | protected function addDiscriminatorMap(ClassMetadata $classMetadata): void |
85 | 85 | { |
86 | - if ($classMetadata->isRootEntity() && ! $classMetadata->isInheritanceTypeNone()) { |
|
86 | + if ($classMetadata->isRootEntity() && !$classMetadata->isInheritanceTypeNone()) { |
|
87 | 87 | $this->addDefaultDiscriminatorMap($classMetadata); |
88 | 88 | } |
89 | 89 | } |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | $services |
54 | 54 | ->set(TablePrefixExtension::class) |
55 | 55 | ->set(TablePrefixExtension::class) |
56 | - ->tag('doctrine.event_listener', [ 'event' => 'loadClassMetadata' ]) |
|
56 | + ->tag('doctrine.event_listener', ['event' => 'loadClassMetadata']) |
|
57 | 57 | ; |
58 | 58 | |
59 | 59 | $services |
60 | 60 | ->set(DiscriminatorMappingExtension::class) |
61 | - ->tag('doctrine.event_listener', [ 'event' => 'loadClassMetadata' ]) |
|
61 | + ->tag('doctrine.event_listener', ['event' => 'loadClassMetadata']) |
|
62 | 62 | ; |
63 | 63 | |
64 | 64 | $services |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | ->args([ |
123 | 123 | tagged('silverback_api_component.data_transformer') |
124 | 124 | ]) |
125 | - ->tag('serializer.normalizer', [ 'priority' => 100 ]) |
|
125 | + ->tag('serializer.normalizer', ['priority' => 100]) |
|
126 | 126 | ; |
127 | 127 | |
128 | 128 | $services |
@@ -46,13 +46,13 @@ |
||
46 | 46 | { |
47 | 47 | if ($resource instanceof RestrictedResourceInterface) { |
48 | 48 | $this->isResourceRestricted($resource); |
49 | - }elseif ($resource instanceof DynamicContent) { |
|
49 | + } elseif ($resource instanceof DynamicContent) { |
|
50 | 50 | $this->isDynamicContentRestricted($resource); |
51 | - }elseif ($resource instanceof Route) { |
|
51 | + } elseif ($resource instanceof Route) { |
|
52 | 52 | $this->isRouteRestricted($resource); |
53 | - }elseif ($resource instanceof ComponentLocation) { |
|
53 | + } elseif ($resource instanceof ComponentLocation) { |
|
54 | 54 | $this->isComponentLocationRestricted($resource); |
55 | - }elseif ($resource instanceof AbstractComponent) { |
|
55 | + } elseif ($resource instanceof AbstractComponent) { |
|
56 | 56 | $this->isComponentRestricted($resource); |
57 | 57 | } |
58 | 58 | } |
@@ -110,7 +110,7 @@ |
||
110 | 110 | } |
111 | 111 | $context[self::ALREADY_CALLED][] = $this->getId($object); |
112 | 112 | if ($object instanceof AbstractComponent || $object instanceof DynamicContent) { |
113 | - $context['groups'] = array_map(static function($grp) { |
|
113 | + $context['groups'] = array_map(static function ($grp) { |
|
114 | 114 | if (strpos($grp, 'route') === 0) { |
115 | 115 | return str_replace('route', 'component', $grp); |
116 | 116 | } |