Skip to content

Commit 3f48c6f

Browse files
committed
style: cs fixes
1 parent 1d13697 commit 3f48c6f

File tree

176 files changed

+529
-529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+529
-529
lines changed

docs/src/DependencyInjection/Compiler/AttributeFilterPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private function createFilterDefinitions(\ReflectionClass $resourceReflectionCla
5353
}
5454

5555
if (null === $filterReflectionClass = $container->getReflectionClass($filterClass, false)) {
56-
throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $filterClass, $id));
56+
throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $filterClass, $id));
5757
}
5858

5959
if ($container->has($filterClass) && ($parentDefinition = $container->findDefinition($filterClass))->isAbstract()) {
@@ -75,7 +75,7 @@ private function createFilterDefinitions(\ReflectionClass $resourceReflectionCla
7575

7676
foreach ($arguments as $key => $value) {
7777
if (!isset($parameterNames[$key])) {
78-
throw new InvalidArgumentException(sprintf('Class "%s" does not have argument "$%s".', $filterClass, $key));
78+
throw new InvalidArgumentException(\sprintf('Class "%s" does not have argument "$%s".', $filterClass, $key));
7979
}
8080

8181
$definition->setArgument("$$key", $value);

src/Doctrine/Common/Filter/BooleanFilterTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private function normalizeValue($value, string $property): ?bool
8686
}
8787

8888
$this->getLogger()->notice('Invalid filter ignored', [
89-
'exception' => new InvalidArgumentException(sprintf('Invalid boolean value for "%s" property, expected one of ( "%s" )', $property, implode('" | "', [
89+
'exception' => new InvalidArgumentException(\sprintf('Invalid boolean value for "%s" property, expected one of ( "%s" )', $property, implode('" | "', [
9090
'true',
9191
'false',
9292
'1',

src/Doctrine/Common/Filter/DateFilterTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected function getFilterDescription(string $property, string $period): array
7373
$propertyName = $this->normalizePropertyName($property);
7474

7575
return [
76-
sprintf('%s[%s]', $propertyName, $period) => [
76+
\sprintf('%s[%s]', $propertyName, $period) => [
7777
'property' => $propertyName,
7878
'type' => \DateTimeInterface::class,
7979
'required' => false,
@@ -85,7 +85,7 @@ private function normalizeValue($value, string $operator): ?string
8585
{
8686
if (false === \is_string($value)) {
8787
$this->getLogger()->notice('Invalid filter ignored', [
88-
'exception' => new InvalidArgumentException(sprintf('Invalid value for "[%s]", expected string', $operator)),
88+
'exception' => new InvalidArgumentException(\sprintf('Invalid value for "[%s]", expected string', $operator)),
8989
]);
9090

9191
return null;

src/Doctrine/Common/Filter/ExistsFilterTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function getDescription(string $resourceClass): array
4949
continue;
5050
}
5151
$propertyName = $this->normalizePropertyName($property);
52-
$description[sprintf('%s[%s]', $this->existsParameterName, $propertyName)] = [
52+
$description[\sprintf('%s[%s]', $this->existsParameterName, $propertyName)] = [
5353
'property' => $propertyName,
5454
'type' => 'bool',
5555
'required' => false,
@@ -81,7 +81,7 @@ private function normalizeValue($value, string $property): ?bool
8181
}
8282

8383
$this->getLogger()->notice('Invalid filter ignored', [
84-
'exception' => new InvalidArgumentException(sprintf('Invalid value for "%s[%s]", expected one of ( "%s" )', $this->existsParameterName, $property, implode('" | "', [
84+
'exception' => new InvalidArgumentException(\sprintf('Invalid value for "%s[%s]", expected one of ( "%s" )', $this->existsParameterName, $property, implode('" | "', [
8585
'true',
8686
'false',
8787
'1',

src/Doctrine/Common/Filter/NumericFilterTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function normalizeValues($value, string $property): ?array
8383
{
8484
if (!is_numeric($value) && (!\is_array($value) || !$this->isNumericArray($value))) {
8585
$this->getLogger()->notice('Invalid filter ignored', [
86-
'exception' => new InvalidArgumentException(sprintf('Invalid numeric value for "%s" property', $property)),
86+
'exception' => new InvalidArgumentException(\sprintf('Invalid numeric value for "%s" property', $property)),
8787
]);
8888

8989
return null;
@@ -102,7 +102,7 @@ protected function normalizeValues($value, string $property): ?array
102102

103103
if (empty($values)) {
104104
$this->getLogger()->notice('Invalid filter ignored', [
105-
'exception' => new InvalidArgumentException(sprintf('At least one value is required, multiple values should be in "%1$s[]=firstvalue&%1$s[]=secondvalue" format', $property)),
105+
'exception' => new InvalidArgumentException(\sprintf('At least one value is required, multiple values should be in "%1$s[]=firstvalue&%1$s[]=secondvalue" format', $property)),
106106
]);
107107

108108
return null;

src/Doctrine/Common/Filter/OrderFilterTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function getDescription(string $resourceClass): array
4848
continue;
4949
}
5050
$propertyName = $this->normalizePropertyName($property);
51-
$description[sprintf('%s[%s]', $this->orderParameterName, $propertyName)] = [
51+
$description[\sprintf('%s[%s]', $this->orderParameterName, $propertyName)] = [
5252
'property' => $propertyName,
5353
'type' => 'string',
5454
'required' => false,

src/Doctrine/Common/Filter/RangeFilterTrait.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function getFilterDescription(string $fieldName, string $operator): ar
6868
$propertyName = $this->normalizePropertyName($fieldName);
6969

7070
return [
71-
sprintf('%s[%s]', $propertyName, $operator) => [
71+
\sprintf('%s[%s]', $propertyName, $operator) => [
7272
'property' => $propertyName,
7373
'type' => 'string',
7474
'required' => false,
@@ -88,7 +88,7 @@ private function normalizeValues(array $values, string $property): ?array
8888

8989
if (empty($values)) {
9090
$this->getLogger()->notice('Invalid filter ignored', [
91-
'exception' => new InvalidArgumentException(sprintf('At least one valid operator ("%s") is required for "%s" property', implode('", "', $operators), $property)),
91+
'exception' => new InvalidArgumentException(\sprintf('At least one valid operator ("%s") is required for "%s" property', implode('", "', $operators), $property)),
9292
]);
9393

9494
return null;
@@ -104,15 +104,15 @@ private function normalizeBetweenValues(array $values): ?array
104104
{
105105
if (2 !== \count($values)) {
106106
$this->getLogger()->notice('Invalid filter ignored', [
107-
'exception' => new InvalidArgumentException(sprintf('Invalid format for "[%s]", expected "<min>..<max>"', self::PARAMETER_BETWEEN)),
107+
'exception' => new InvalidArgumentException(\sprintf('Invalid format for "[%s]", expected "<min>..<max>"', self::PARAMETER_BETWEEN)),
108108
]);
109109

110110
return null;
111111
}
112112

113113
if (!is_numeric($values[0]) || !is_numeric($values[1])) {
114114
$this->getLogger()->notice('Invalid filter ignored', [
115-
'exception' => new InvalidArgumentException(sprintf('Invalid values for "[%s]" range, expected numbers', self::PARAMETER_BETWEEN)),
115+
'exception' => new InvalidArgumentException(\sprintf('Invalid values for "[%s]" range, expected numbers', self::PARAMETER_BETWEEN)),
116116
]);
117117

118118
return null;
@@ -128,7 +128,7 @@ private function normalizeValue(string $value, string $operator): float|int|null
128128
{
129129
if (!is_numeric($value)) {
130130
$this->getLogger()->notice('Invalid filter ignored', [
131-
'exception' => new InvalidArgumentException(sprintf('Invalid value for "[%s]", expected number', $operator)),
131+
'exception' => new InvalidArgumentException(\sprintf('Invalid value for "[%s]", expected number', $operator)),
132132
]);
133133

134134
return null;

src/Doctrine/Common/Filter/SearchFilterTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ protected function normalizeValues(array $values, string $property): ?array
151151

152152
if (empty($values)) {
153153
$this->getLogger()->notice('Invalid filter ignored', [
154-
'exception' => new InvalidArgumentException(sprintf('At least one value is required, multiple values should be in "%1$s[]=firstvalue&%1$s[]=secondvalue" format', $property)),
154+
'exception' => new InvalidArgumentException(\sprintf('At least one value is required, multiple values should be in "%1$s[]=firstvalue&%1$s[]=secondvalue" format', $property)),
155155
]);
156156

157157
return null;

src/Doctrine/Common/State/LinksHandlerLocatorTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ private function getLinksHandler(Operation $operation): ?callable
3939
return [$this->handleLinksLocator->get($handleLinks), 'handleLinks'];
4040
}
4141

42-
throw new RuntimeException(sprintf('Could not find handleLinks service "%s"', $handleLinks));
42+
throw new RuntimeException(\sprintf('Could not find handleLinks service "%s"', $handleLinks));
4343
}
4444
}

src/Doctrine/Common/State/LinksHandlerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private function getLinks(string $resourceClass, Operation $operation, array $co
8383
}
8484

8585
if (!$newLink) {
86-
throw new RuntimeException(sprintf('The class "%s" cannot be retrieved from "%s".', $resourceClass, $linkClass));
86+
throw new RuntimeException(\sprintf('The class "%s" cannot be retrieved from "%s".', $resourceClass, $linkClass));
8787
}
8888

8989
return [$newLink];

0 commit comments

Comments
 (0)