Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbd2bf7e

Browse files
committed
Prefix all sprintf() calls
1 parent690a40c commitbd2bf7e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

‎ServiceLocatorTrait.php‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,16 @@ private function createNotFoundException(string $id): NotFoundExceptionInterface
9090
}else {
9191
$last =array_pop($alternatives);
9292
if ($alternatives) {
93-
$message =sprintf('only knows about the "%s" and "%s" services.',implode('", "',$alternatives),$last);
93+
$message =\sprintf('only knows about the "%s" and "%s" services.',implode('", "',$alternatives),$last);
9494
}else {
95-
$message =sprintf('only knows about the "%s" service.',$last);
95+
$message =\sprintf('only knows about the "%s" service.',$last);
9696
}
9797
}
9898

9999
if ($this->loading) {
100-
$message =sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s',end($this->loading),$id,$message);
100+
$message =\sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s',end($this->loading),$id,$message);
101101
}else {
102-
$message =sprintf('Service "%s" not found: the current service locator %s',$id,$message);
102+
$message =\sprintf('Service "%s" not found: the current service locator %s',$id,$message);
103103
}
104104

105105
returnnewclass($message)extends \InvalidArgumentExceptionimplements NotFoundExceptionInterface {
@@ -108,7 +108,7 @@ private function createNotFoundException(string $id): NotFoundExceptionInterface
108108

109109
privatefunctioncreateCircularReferenceException(string$id,array$path):ContainerExceptionInterface
110110
{
111-
returnnewclass(sprintf('Circular reference detected for service "%s", path: "%s".',$id,implode(' ->',$path)))extends \RuntimeExceptionimplements ContainerExceptionInterface {
111+
returnnewclass(\sprintf('Circular reference detected for service "%s", path: "%s".',$id,implode(' ->',$path)))extends \RuntimeExceptionimplements ContainerExceptionInterface {
112112
};
113113
}
114114
}

‎ServiceMethodsSubscriberTrait.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ public static function getSubscribedServices(): array
4242
}
4343

4444
if ($method->isStatic() ||$method->isAbstract() ||$method->isGenerator() ||$method->isInternal() ||$method->getNumberOfRequiredParameters()) {
45-
thrownew \LogicException(sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class,self::class,$method->name));
45+
thrownew \LogicException(\sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class,self::class,$method->name));
4646
}
4747

4848
if (!$returnType =$method->getReturnType()) {
49-
thrownew \LogicException(sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class,$method->name,self::class));
49+
thrownew \LogicException(\sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class,$method->name,self::class));
5050
}
5151

5252
/* @var SubscribedService $attribute */

‎ServiceSubscriberTrait.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ public static function getSubscribedServices(): array
4646
}
4747

4848
if ($method->isStatic() ||$method->isAbstract() ||$method->isGenerator() ||$method->isInternal() ||$method->getNumberOfRequiredParameters()) {
49-
thrownew \LogicException(sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class,self::class,$method->name));
49+
thrownew \LogicException(\sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class,self::class,$method->name));
5050
}
5151

5252
if (!$returnType =$method->getReturnType()) {
53-
thrownew \LogicException(sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class,$method->name,self::class));
53+
thrownew \LogicException(\sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class,$method->name,self::class));
5454
}
5555

5656
/* @var SubscribedService $attribute */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp