Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/Command/BurndownCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/Command/LabelCardsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
5 changes: 3 additions & 2 deletions src/Command/ListCardsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand All @@ -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);

Expand Down
9 changes: 6 additions & 3 deletions src/Command/ListPeopleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
}
Expand All @@ -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 . "]");

Expand Down