aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-04-22 18:11:32 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-04-30 09:23:58 +0200
commit672923f0a6ab5a692273326250fe1394b4e41bd9 (patch)
tree83f972fa6d854199a5be687531e99688dbb2ab2e /core/Command
parentce2d6cd81ec5aa66e9cf5040c211e1239b4bc830 (diff)
downloadnextcloud-server-672923f0a6ab5a692273326250fe1394b4e41bd9.tar.gz
nextcloud-server-672923f0a6ab5a692273326250fe1394b4e41bd9.zip
fix: Fix newly spotted psalm issues, add exhaustive typed magic properties for LDAP classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Preview/Generate.php4
1 files changed, 2 insertions, 2 deletions
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("<error>Invalid size $size</error>");
return null;
}