Skip to content

Commit c1cc672

Browse files
CS fixes
1 parent ef1f03c commit c1cc672

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

GenericRuntime.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ public function getRunner(?object $application): RunnerInterface
125125
}
126126

127127
if (!\is_callable($application)) {
128-
throw new \LogicException(sprintf('"%s" doesn\'t know how to handle apps of type "%s".', get_debug_type($this), get_debug_type($application)));
128+
throw new \LogicException(\sprintf('"%s" doesn\'t know how to handle apps of type "%s".', get_debug_type($this), get_debug_type($application)));
129129
}
130130

131131
$application = $application(...);
132132
}
133133

134134
if ($_SERVER[$this->options['debug_var_name']] && ($r = new \ReflectionFunction($application)) && $r->getNumberOfRequiredParameters()) {
135-
throw new \ArgumentCountError(sprintf('Zero argument should be required by the runner callable, but at least one is in "%s" on line "%d.', $r->getFileName(), $r->getStartLine()));
135+
throw new \ArgumentCountError(\sprintf('Zero argument should be required by the runner callable, but at least one is in "%s" on line "%d.', $r->getFileName(), $r->getStartLine()));
136136
}
137137

138138
return new ClosureRunner($application);
@@ -171,7 +171,7 @@ protected function getArgument(\ReflectionParameter $parameter, ?string $type):
171171
if (!$runtime = $this->getRuntime($type)) {
172172
$r = $parameter->getDeclaringFunction();
173173

174-
throw new \InvalidArgumentException(sprintf('Cannot resolve argument "%s $%s" in "%s" on line "%d": "%s" supports only arguments "array $context", "array $argv" and "array $request", or a runtime named "Symfony\Runtime\%1$sRuntime".', $type, $parameter->name, $r->getFileName(), $r->getStartLine(), get_debug_type($this)));
174+
throw new \InvalidArgumentException(\sprintf('Cannot resolve argument "%s $%s" in "%s" on line "%d": "%s" supports only arguments "array $context", "array $argv" and "array $request", or a runtime named "Symfony\Runtime\%1$sRuntime".', $type, $parameter->name, $r->getFileName(), $r->getStartLine(), get_debug_type($this)));
175175
}
176176

177177
return $runtime->getArgument($parameter, $type);

Internal/ComposerPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function updateAutoloadFile(): void
7070
}
7171

7272
if (!is_file($autoloadTemplate)) {
73-
throw new \InvalidArgumentException(sprintf('File "%s" defined under "extra.runtime.autoload_template" in your composer.json file not found.', $this->composer->getPackage()->getExtra()['runtime']['autoload_template']));
73+
throw new \InvalidArgumentException(\sprintf('File "%s" defined under "extra.runtime.autoload_template" in your composer.json file not found.', $this->composer->getPackage()->getExtra()['runtime']['autoload_template']));
7474
}
7575
}
7676

Resolver/DebugClosureResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static function (...$arguments) use ($closure) {
2828

2929
$r = new \ReflectionFunction($closure);
3030

31-
throw new \TypeError(sprintf('Unexpected value of type "%s" returned, "object" expected from "%s" on line "%d".', get_debug_type($app), $r->getFileName(), $r->getStartLine()));
31+
throw new \TypeError(\sprintf('Unexpected value of type "%s" returned, "object" expected from "%s" on line "%d".', get_debug_type($app), $r->getFileName(), $r->getStartLine()));
3232
},
3333
$arguments,
3434
];

Runner/ClosureRunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function run(): int
3636
if (null !== $exitStatus && !\is_int($exitStatus)) {
3737
$r = new \ReflectionFunction($this->closure);
3838

39-
throw new \TypeError(sprintf('Unexpected value of type "%s" returned, "string|int|null" expected from "%s" on line "%d".', get_debug_type($exitStatus), $r->getFileName(), $r->getStartLine()));
39+
throw new \TypeError(\sprintf('Unexpected value of type "%s" returned, "string|int|null" expected from "%s" on line "%d".', get_debug_type($exitStatus), $r->getFileName(), $r->getStartLine()));
4040
}
4141

4242
return $exitStatus ?? 0;

SymfonyRuntime.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function __construct(array $options = [])
108108

109109
if (isset($this->input) && ($options['dotenv_overload'] ?? false)) {
110110
if ($this->input->getParameterOption(['--env', '-e'], $_SERVER[$envKey], true) !== $_SERVER[$envKey]) {
111-
throw new \LogicException(sprintf('Cannot use "--env" or "-e" when the "%s" file defines "%s" and the "dotenv_overload" runtime option is true.', $options['dotenv_path'] ?? '.env', $envKey));
111+
throw new \LogicException(\sprintf('Cannot use "--env" or "-e" when the "%s" file defines "%s" and the "dotenv_overload" runtime option is true.', $options['dotenv_path'] ?? '.env', $envKey));
112112
}
113113

114114
if ($_SERVER[$debugKey] && $this->input->hasParameterOption('--no-debug', true)) {
@@ -207,7 +207,7 @@ protected static function register(GenericRuntime $runtime): GenericRuntime
207207

208208
private function getInput(): ArgvInput
209209
{
210-
if (!empty($_GET) && filter_var(ini_get('register_argc_argv'), \FILTER_VALIDATE_BOOL)) {
210+
if (!empty($_GET) && filter_var(\ini_get('register_argc_argv'), \FILTER_VALIDATE_BOOL)) {
211211
throw new \Exception('CLI applications cannot be run safely on non-CLI SAPIs with register_argc_argv=On.');
212212
}
213213

0 commit comments

Comments
 (0)