From 01cf4376c9c6564b90b6cffa794ae6e2869e1d89 Mon Sep 17 00:00:00 2001 From: Ben Selby Date: Mon, 2 Mar 2026 20:48:48 +0000 Subject: [PATCH 1/2] Update phpstan --- composer.lock | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index ec69d95..773324d 100644 --- a/composer.lock +++ b/composer.lock @@ -1501,16 +1501,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.29", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-phar-composer-source.git", - "reference": "git" - }, + "version": "2.1.40", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d618573eed4a1b6b75e37b2e0b65ac65c885d88e", - "reference": "d618573eed4a1b6b75e37b2e0b65ac65c885d88e", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b", + "reference": "9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b", "shasum": "" }, "require": { @@ -1555,7 +1550,7 @@ "type": "github" } ], - "time": "2025-09-25T06:58:18+00:00" + "time": "2026-02-23T15:04:35+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3094,5 +3089,5 @@ "prefer-lowest": false, "platform": {}, "platform-dev": {}, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } From d22b67ef6f69d99687813a391a213296d753a90a Mon Sep 17 00:00:00 2001 From: Ben Selby Date: Tue, 3 Mar 2026 20:15:01 +0000 Subject: [PATCH 2/2] Fix some of the phpstan issues --- src/Command/BurndownCommand.php | 3 +++ src/Command/LabelCardsCommand.php | 3 ++- src/Command/ListCardsCommand.php | 5 +++-- src/Command/ListPeopleCommand.php | 9 ++++++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Command/BurndownCommand.php b/src/Command/BurndownCommand.php index 0a1606c..cbe5ccf 100644 --- a/src/Command/BurndownCommand.php +++ b/src/Command/BurndownCommand.php @@ -71,6 +71,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int $cards = $this->client->getCards($board['id']); foreach ($cards as $card) { + if (!isset($lists[$card['idList']])) { + continue; + } $lists[$card['idList']]['count'] += 1; preg_match('/^\((.+?)\)/', $card['name'], $points); diff --git a/src/Command/LabelCardsCommand.php b/src/Command/LabelCardsCommand.php index e7068ce..07bb54e 100644 --- a/src/Command/LabelCardsCommand.php +++ b/src/Command/LabelCardsCommand.php @@ -74,7 +74,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int } foreach ($boardLayout as $layout) { - $output->writeln($layout['name'] . ' (' . count($layout['cards']) . ')'); + $layoutName = $layout['name'] ?? ''; + $output->writeln($layoutName . ' (' . count($layout['cards']) . ')'); foreach ($layout['cards'] as $layoutCard) { $output->writeln(' ' . $layoutCard); } diff --git a/src/Command/ListCardsCommand.php b/src/Command/ListCardsCommand.php index 575d3af..034feae 100644 --- a/src/Command/ListCardsCommand.php +++ b/src/Command/ListCardsCommand.php @@ -122,7 +122,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } foreach ($cards as $card) { - $cardName = $card['name']; + $cardName = $card['name'] ?? ''; if (!empty($card['badges']['due'])) { $due = new \DateTime($card['badges']['due']); @@ -142,7 +142,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int $output->writeln(str_repeat("=", strlen($title)) . PHP_EOL); foreach ($boardLayout as $layout) { - $listName = $layout['name'] . ' (' . count($layout['cards']) . ')'; + $layoutName = $layout['name'] ?? ''; + $listName = $layoutName . ' (' . count($layout['cards']) . ')'; $output->writeln($listName); $output->writeln(str_repeat("=", strlen($listName)) . PHP_EOL); diff --git a/src/Command/ListPeopleCommand.php b/src/Command/ListPeopleCommand.php index 3226c52..8c13bc0 100644 --- a/src/Command/ListPeopleCommand.php +++ b/src/Command/ListPeopleCommand.php @@ -77,14 +77,17 @@ protected function execute(InputInterface $input, OutputInterface $output): int foreach ($cards as $card) { foreach ($card['idMembers'] as $cardMemberId) { + if (!isset($members[$cardMemberId])) { + continue; + } $members[$cardMemberId]['cards'][$card['idList']][] = $card; $members[$cardMemberId]['cardCount'] = (int) $members[$cardMemberId]['cardCount'] + 1; preg_match('/^\((.+?)\)/', $card['name'], $points); if (!empty($points) && isset($points[1])) { - $members[$cardMemberId]['storyPoints'] = - (float) $members[$cardMemberId]['storyPoints'] + (float) $points[1]; + $storyPoints = (float) $members[$cardMemberId]['storyPoints']; + $members[$cardMemberId]['storyPoints'] = $storyPoints + (float) $points[1]; } } } @@ -95,7 +98,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($cardCount == 0 && $showUnassigned == false) { continue; } - $output->writeln($member['name']); + $output->writeln($member['name'] ?? ""); $output->writeln(" Story Points [" . $member['storyPoints'] . "]"); $output->writeln(" Cards [" . $cardCount . "]");