Skip to content

Commit

Permalink
Run CS fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Nov 3, 2024
1 parent 457bd50 commit 4b058e2
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/RouteGenerator/RouterAwareRouteGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct(
) {
// Check missing options
if (!isset($options['routeName'])) {
throw new InvalidArgumentException(sprintf('The "%s" class options requires a "routeName" parameter to be set.', self::class));
throw new InvalidArgumentException(\sprintf('The "%s" class options requires a "routeName" parameter to be set.', self::class));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Twig/UndefinedCallableHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public function onUndefinedFunction(string $name): ?bool
return false;
}

throw new SyntaxError(sprintf('Unknown function "%s". Did you forget to run "composer require pagerfanta/twig"?', $name));
throw new SyntaxError(\sprintf('Unknown function "%s". Did you forget to run "composer require pagerfanta/twig"?', $name));
}
}
10 changes: 5 additions & 5 deletions src/View/ContainerBackedImmutableViewFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(
*/
public function add(array $views): void
{
throw new ImmutableViewFactoryException(sprintf('"%s" cannot be modified after instantiation.', self::class));
throw new ImmutableViewFactoryException(\sprintf('"%s" cannot be modified after instantiation.', self::class));
}

/**
Expand All @@ -47,7 +47,7 @@ public function all(): array
*/
public function clear(): void
{
throw new ImmutableViewFactoryException(sprintf('"%s" cannot be modified after instantiation.', self::class));
throw new ImmutableViewFactoryException(\sprintf('"%s" cannot be modified after instantiation.', self::class));
}

/**
Expand All @@ -56,7 +56,7 @@ public function clear(): void
public function get(string $name): ViewInterface
{
if (!$this->has($name)) {
throw new InvalidArgumentException(sprintf('The view "%s" does not exist.', $name));
throw new InvalidArgumentException(\sprintf('The view "%s" does not exist.', $name));
}

return $this->container->get($name);
Expand All @@ -72,14 +72,14 @@ public function has(string $name): bool
*/
public function remove(string $name): void
{
throw new ImmutableViewFactoryException(sprintf('"%s" cannot be modified after instantiation.', self::class));
throw new ImmutableViewFactoryException(\sprintf('"%s" cannot be modified after instantiation.', self::class));
}

/**
* @throws ImmutableViewFactoryException
*/
public function set(string $name, ViewInterface $view): void
{
throw new ImmutableViewFactoryException(sprintf('"%s" cannot be modified after instantiation.', self::class));
throw new ImmutableViewFactoryException(\sprintf('"%s" cannot be modified after instantiation.', self::class));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function testContainerIsLoadedWithDefaultConfigurationWhenTwigBundleIsIns
$refl = new \ReflectionClass(PagerfantaExtension::class);

if (false === $refl->getFileName()) {
self::fail(sprintf('Could not reflect "%s"', PagerfantaExtension::class));
self::fail(\sprintf('Could not reflect "%s"', PagerfantaExtension::class));
}

$path = \dirname($refl->getFileName(), 2).'/templates/';
Expand Down
2 changes: 1 addition & 1 deletion tests/Serializer/Normalizer/PagerfantaNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function testNormalizeWithLegacyDecorator(): void
public function testNormalizeOnlyAcceptsPagerfantaInstances(): void
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage(sprintf('The object must be an instance of "%s".', PagerfantaInterface::class));
$this->expectExceptionMessage(\sprintf('The object must be an instance of "%s".', PagerfantaInterface::class));

(new PagerfantaNormalizer())->normalize(new \stdClass());
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Twig/TwigUndefinedCallableHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function dataSupportedFunctions(): \Generator
public function testThrowsASyntaxErrorForSupportedTwigFunctionsWhenNotDefined(string $function): void
{
$this->expectException(SyntaxError::class);
$this->expectExceptionMessage(sprintf('Unknown function "%s". Did you forget to run "composer require pagerfanta/twig"?', $function));
$this->expectExceptionMessage(\sprintf('Unknown function "%s". Did you forget to run "composer require pagerfanta/twig"?', $function));

(new UndefinedCallableHandler())->onUndefinedFunction($function);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/View/ContainerBackedImmutableViewFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function __construct(private readonly array $views) {}

public function get(string $id)
{
return $this->views[$id] ?? throw new class() extends \RuntimeException implements NotFoundExceptionInterface {};
return $this->views[$id] ?? throw new class extends \RuntimeException implements NotFoundExceptionInterface {};
}

public function has(string $id): bool
Expand Down

0 comments on commit 4b058e2

Please sign in to comment.