From 672923f0a6ab5a692273326250fe1394b4e41bd9 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 22 Apr 2024 18:11:32 +0200 Subject: fix: Fix newly spotted psalm issues, add exhaustive typed magic properties for LDAP classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- core/Command/Preview/Generate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/Command') diff --git a/core/Command/Preview/Generate.php b/core/Command/Preview/Generate.php index 86528319199..b43f52a66a8 100644 --- a/core/Command/Preview/Generate.php +++ b/core/Command/Preview/Generate.php @@ -57,13 +57,13 @@ class Generate extends Command { protected function execute(InputInterface $input, OutputInterface $output): int { $fileInput = $input->getArgument("file"); $sizes = $input->getOption("size"); - $sizes = array_map(function (string $size) use ($output, &$error) { + $sizes = array_map(function (string $size) use ($output) { if (str_contains($size, 'x')) { $sizeParts = explode('x', $size, 2); } else { $sizeParts = [$size, $size]; } - if (!is_numeric($sizeParts[0]) || !is_numeric($sizeParts[1])) { + if (!is_numeric($sizeParts[0]) || !is_numeric($sizeParts[1] ?? null)) { $output->writeln("Invalid size $size"); return null; } -- cgit v1.2.3