Skip to content

Commit 899e72f

Browse files
committed
Run CS fixers
1 parent f4470d8 commit 899e72f

11 files changed

Lines changed: 19 additions & 19 deletions

File tree

rector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use Rector\Config\RectorConfig;
44
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
5-
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
5+
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
66
use Rector\PHPUnit\Set\PHPUnitSetList;
77
use Rector\Set\ValueObject\LevelSetList;
88
use Rector\Set\ValueObject\SetList;
@@ -19,7 +19,7 @@
1919
* Skip selected rules
2020
*/
2121

22-
AddSeeTestAnnotationRector::class,
22+
PreferPHPUnitThisCallRector::class,
2323

2424
/*
2525
* Skip selected rules in selected files

src/Authentication/Storage/Driver/InMemoryStorageDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function delete(string $id): bool
3030
public function get(string $id): TokenInterface
3131
{
3232
if (!$this->has($id)) {
33-
throw new TokenNotFound(sprintf('Token for ID "%s" not found.', $id));
33+
throw new TokenNotFound(\sprintf('Token for ID "%s" not found.', $id));
3434
}
3535

3636
return $this->tokens[$id];

src/Authentication/Storage/DriverBackedTokenStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function addToken(string $id, TokenInterface $token): void
3838
$result = $this->driver->store($id, $token);
3939

4040
if (false === $result) {
41-
throw new StorageError(sprintf('Unable to add client "%s" to storage', $token->getUserIdentifier()));
41+
throw new StorageError(\sprintf('Unable to add client "%s" to storage', $token->getUserIdentifier()));
4242
}
4343
}
4444

src/Command/RunWebSocketServerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
4444
/** @var string $uri */
4545
$uri = $input->getArgument('uri') ?: $this->uri;
4646

47-
$this->style->info(sprintf('Launching websocket server, listening on "%s"', $uri));
47+
$this->style->info(\sprintf('Launching websocket server, listening on "%s"', $uri));
4848

4949
$socketServer = $this->socketServerFactory->build($uri);
5050
$server = $this->serverFactory->build($socketServer);

src/DependencyInjection/Compiler/PingDBALConnectionsCompilerPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function process(ContainerBuilder $container): void
2424

2525
foreach ($container->getParameter('babdev_websocket_server.ping_dbal_connections') as $id) {
2626
if (!$container->has($id)) {
27-
throw new InvalidArgumentException(sprintf('The "%s" service does not exist in the container, please review the "server.periodic.dbal.connections" configuration for the BabDevWebSocketBundle to ensure all connections are set in your DoctrineBundle configuration.', $id));
27+
throw new InvalidArgumentException(\sprintf('The "%s" service does not exist in the container, please review the "server.periodic.dbal.connections" configuration for the BabDevWebSocketBundle to ensure all connections are set in your DoctrineBundle configuration.', $id));
2828
}
2929

3030
$container->findDefinition($id)

src/DependencyInjection/Configuration.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private function addServerSection(ArrayNodeDefinition $rootNode): void
8181
->info('The default URI to listen for connections on.')
8282
->end()
8383
->variableNode('context')
84-
->info(sprintf('Options used to configure the stream context, see the "%s" class documentation for more details.', SocketServer::class))
84+
->info(\sprintf('Options used to configure the stream context, see the "%s" class documentation for more details.', SocketServer::class))
8585
->defaultValue([])
8686
->end()
8787
->arrayNode('allowed_origins')
@@ -111,7 +111,7 @@ private function addServerSection(ArrayNodeDefinition $rootNode): void
111111
->addDefaultsIfNotSet()
112112
->children()
113113
->arrayNode('connections')
114-
->info(sprintf('A list of "%s" services to ping.', Connection::class))
114+
->info(\sprintf('A list of "%s" services to ping.', Connection::class))
115115
->scalarPrototype()->end()
116116
->end()
117117
->integerNode('interval')
@@ -138,13 +138,13 @@ private function addServerSection(ArrayNodeDefinition $rootNode): void
138138
->addDefaultsIfNotSet()
139139
->children()
140140
->scalarNode('factory_service_id')
141-
->info(sprintf('A service ID for a "%s" implementation to create the session service.', SessionFactoryInterface::class))
141+
->info(\sprintf('A service ID for a "%s" implementation to create the session service.', SessionFactoryInterface::class))
142142
->end()
143143
->scalarNode('storage_factory_service_id')
144-
->info(sprintf('A service ID for a "%s" implementation to create the session storage service, used with the default session factory.', SessionStorageFactoryInterface::class))
144+
->info(\sprintf('A service ID for a "%s" implementation to create the session storage service, used with the default session factory.', SessionStorageFactoryInterface::class))
145145
->end()
146146
->scalarNode('handler_service_id')
147-
->info(sprintf('A service ID for a "%s" implementation to create the session handler, used with the default session storage factory.', \SessionHandlerInterface::class))
147+
->info(\sprintf('A service ID for a "%s" implementation to create the session handler, used with the default session storage factory.', \SessionHandlerInterface::class))
148148
->end()
149149
->end()
150150
->validate()

src/DependencyInjection/Factory/Authentication/SessionAuthenticationProviderFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function createAuthenticationProvider(ContainerBuilder $container, array
3232

3333
$firewalls = new Parameter('security.firewalls');
3434
} else {
35-
throw new InvalidArgumentException(sprintf('The "firewalls" config must be an array, a string, or null; "%s" given.', get_debug_type($config['firewalls'])));
35+
throw new InvalidArgumentException(\sprintf('The "firewalls" config must be an array, a string, or null; "%s" given.', get_debug_type($config['firewalls'])));
3636
}
3737

3838
$providerId = 'babdev_websocket_server.authentication.provider.session.default';

src/PeriodicManager/ArrayPeriodicManagerRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(iterable $managers = [])
2727
public function addManager(PeriodicManager $manager): void
2828
{
2929
if (isset($this->managers[$manager->getName()])) {
30-
throw new ManagerAlreadyRegistered(sprintf('A manager named "%s" is already registered.', $manager->getName()));
30+
throw new ManagerAlreadyRegistered(\sprintf('A manager named "%s" is already registered.', $manager->getName()));
3131
}
3232

3333
$this->managers[$manager->getName()] = $manager;

src/Routing/Loader/AttributeLoader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ public function __construct(?string $env = null)
2828
public function load(mixed $class, ?string $type = null): RouteCollection
2929
{
3030
if (!class_exists($class)) {
31-
throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class));
31+
throw new \InvalidArgumentException(\sprintf('Class "%s" does not exist.', $class));
3232
}
3333

3434
/** @var \ReflectionClass<AsMessageHandler> $class */
3535
$class = new \ReflectionClass($class);
3636

3737
if ($class->isAbstract()) {
38-
throw new \InvalidArgumentException(sprintf('Attributes from class "%s" cannot be read as it is abstract.', $class->getName()));
38+
throw new \InvalidArgumentException(\sprintf('Attributes from class "%s" cannot be read as it is abstract.', $class->getName()));
3939
}
4040

4141
$collection = new RouteCollection();
@@ -59,7 +59,7 @@ public function load(mixed $class, ?string $type = null): RouteCollection
5959

6060
foreach ($requirements as $placeholder => $requirement) {
6161
if (\is_int($placeholder)) {
62-
throw new \InvalidArgumentException(sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of the route in "%s"?', $placeholder, $requirement, $class->getName()));
62+
throw new \InvalidArgumentException(\sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of the route in "%s"?', $placeholder, $requirement, $class->getName()));
6363
}
6464
}
6565

src/Server/ServiceBasedMiddlewareStackBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __construct(private ?ServerMiddleware $middleware = null) {}
2020
public function build(): ServerMiddleware
2121
{
2222
if (!$this->middleware instanceof ServerMiddleware) {
23-
throw new MiddlewareNotConfigured(sprintf('The middleware stack is not configured. Ensure your %s instances have the "babdev_websocket_server.server_middleware" service tag or implement your own middleware stack builder.', ServerMiddleware::class));
23+
throw new MiddlewareNotConfigured(\sprintf('The middleware stack is not configured. Ensure your %s instances have the "babdev_websocket_server.server_middleware" service tag or implement your own middleware stack builder.', ServerMiddleware::class));
2424
}
2525

2626
return $this->middleware;

0 commit comments

Comments
 (0)