Skip to content

Commit 307a09d

Browse files
CS fixes
1 parent 0ffc480 commit 307a09d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Debug/TraceableEventDispatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function dispatch(object $event, ?string $eventName = null): object
127127
$currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : '';
128128

129129
if (null !== $this->logger && $event instanceof StoppableEventInterface && $event->isPropagationStopped()) {
130-
$this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName));
130+
$this->logger->debug(\sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName));
131131
}
132132

133133
$this->preProcess($eventName);

DependencyInjection/RegisterListenersPass.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function process(ContainerBuilder $container)
9191

9292
if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method'])) {
9393
if (!$r->hasMethod('__invoke')) {
94-
throw new InvalidArgumentException(sprintf('None of the "%s" or "__invoke" methods exist for the service "%s". Please define the "method" attribute on "kernel.event_listener" tags.', $event['method'], $id));
94+
throw new InvalidArgumentException(\sprintf('None of the "%s" or "__invoke" methods exist for the service "%s". Please define the "method" attribute on "kernel.event_listener" tags.', $event['method'], $id));
9595
}
9696

9797
$event['method'] = '__invoke';
@@ -126,10 +126,10 @@ public function process(ContainerBuilder $container)
126126
$class = $def->getClass();
127127

128128
if (!$r = $container->getReflectionClass($class)) {
129-
throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
129+
throw new InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
130130
}
131131
if (!$r->isSubclassOf(EventSubscriberInterface::class)) {
132-
throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EventSubscriberInterface::class));
132+
throw new InvalidArgumentException(\sprintf('Service "%s" must implement interface "%s".', $id, EventSubscriberInterface::class));
133133
}
134134
$class = $r->name;
135135

@@ -181,7 +181,7 @@ private function getEventFromTypeDeclaration(ContainerBuilder $container, string
181181
|| $type->isBuiltin()
182182
|| Event::class === ($name = $type->getName())
183183
) {
184-
throw new InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "kernel.event_listener" tags.', $id));
184+
throw new InvalidArgumentException(\sprintf('Service "%s" must define the "event" attribute on "kernel.event_listener" tags.', $id));
185185
}
186186

187187
return $name;

GenericEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function getArgument(string $key): mixed
5959
return $this->arguments[$key];
6060
}
6161

62-
throw new \InvalidArgumentException(sprintf('Argument "%s" not found.', $key));
62+
throw new \InvalidArgumentException(\sprintf('Argument "%s" not found.', $key));
6363
}
6464

6565
/**

Tests/DependencyInjection/RegisterListenersPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,14 @@ public function testInvokableEventListener()
202202
$container = new ContainerBuilder();
203203
$container->setParameter('event_dispatcher.event_aliases', [AliasedEvent::class => 'aliased_event']);
204204

205-
$container->register('foo', \get_class(new class() {
205+
$container->register('foo', \get_class(new class {
206206
public function onFooBar()
207207
{
208208
}
209209
}))->addTag('kernel.event_listener', ['event' => 'foo.bar']);
210210
$container->register('bar', InvokableListenerService::class)->addTag('kernel.event_listener', ['event' => 'foo.bar']);
211211
$container->register('baz', InvokableListenerService::class)->addTag('kernel.event_listener', ['event' => 'event']);
212-
$container->register('zar', \get_class(new class() {
212+
$container->register('zar', \get_class(new class {
213213
public function onFooBarZar()
214214
{
215215
}

0 commit comments

Comments
 (0)