8000 Fixed bugs found by psalm · symfony/symfony@c6db772 · GitHub
[go: up one dir, main page]

Skip to content

Commit c6db772

Browse files
committed
Fixed bugs found by psalm
1 parent 77870a5 commit c6db772

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private function displayJson(OutputInterface $output, array $filesInfo)
226226
return min($errors, 1);
227227
}
228228

229-
private function renderException(OutputInterface $output, string $template, Error $exception, string $file = null)
229+
private function renderException(SymfonyStyle $output, string $template, Error $exception, string $file = null)
230230
{
231231
$line = $exception->getTemplateLine();
232232

src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function getBcc(): array
182182
*/
183183
public function setPriority(int $priority): self
184184
{
185-
$this->message->setPriority($priority);
185+
$this->message->priority($priority);
186186

187187
return $this;
188188
}

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ public function getContent($asResource = false)
15641564
*/
15651565
public function getETags()
15661566
{
1567-
return preg_split('/\s*,\s*/', $this->headers->get('if_none_match'), null, \PREG_SPLIT_NO_EMPTY);
1567+
return preg_split('/\s*,\s*/', $this->headers->get('if_none_match'), -1, \PREG_SPLIT_NO_EMPTY);
15681568
}
15691569

15701570
/**

src/Symfony/Component/VarDumper/Command/ServerDumpCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9595
$this->server->listen(function (Data $data, array $context, int $clientId) use ($descriptor, $io) {
9696
$descriptor->describe($io, $data, $context, $clientId);
9797
});
98+
99+
return 0;
98100
}
99101
}

src/Symfony/Component/VarExporter/Internal/Exporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount
8282
}
8383

8484
if (!\is_array($properties = $value->__serialize())) {
85-
throw new \Typerror($class.'::__serialize() must return an array');
85+
throw new \TypeError($class.'::__serialize() must return an array');
8686
}
8787

8888
goto prepare_value;

src/Symfony/Contracts/Service/ServiceSubscriberTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static function getSubscribedServices(): array
4343
}
4444

4545
if (self::class === $method->getDeclaringClass()->name && ($returnType = $method->getReturnType()) && !$returnType->isBuiltin()) {
46-
$services[self::class.'::'.$method->name] = '?'.($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $type);
46+
$services[self::class.'::'.$method->name] = '?'.($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $returnType);
4747
}
4848
}
4949

0 commit comments

Comments
 (0)
0