From e751c8e4eb58818f96e71323ed315848b9370c36 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 8 Jan 2025 14:09:14 +0100 Subject: [PATCH] Fix new phpstan error --- src/Composer/Util/Tar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Tar.php b/src/Composer/Util/Tar.php index bb8c8c3d2..1fb608f65 100644 --- a/src/Composer/Util/Tar.php +++ b/src/Composer/Util/Tar.php @@ -50,7 +50,7 @@ class Tar } $composerJsonPath = key($topLevelPaths).'/composer.json'; - if ($topLevelPaths && isset($phar[$composerJsonPath])) { + if (\count($topLevelPaths) > 0 && isset($phar[$composerJsonPath])) { return $phar[$composerJsonPath]->getContent(); }