• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JBZoo / Composer-Diff / 6669924894

16 Aug 2023 06:22PM UTC coverage: 94.294%. Remained the same
6669924894

push

github

web-flow
Upgrade `jbzoo/cli:^7.1.1` (#26)

1 of 1 new or added line in 1 file covered. (100.0%)

314 of 333 relevant lines covered (94.29%)

49.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/Renders/JsonOutput.php
1
<?php
2

3
/**
4
 * JBZoo Toolbox - Composer-Diff.
5
 *
6
 * This file is part of the JBZoo Toolbox project.
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license    MIT
11
 * @copyright  Copyright (C) JBZoo.com, All rights reserved.
12
 * @see        https://github.com/JBZoo/Composer-Diff
13
 */
14

15
declare(strict_types=1);
16

17
namespace JBZoo\ComposerDiff\Renders;
18

19
use Symfony\Component\Console\Output\OutputInterface;
20

21
use function JBZoo\Data\json;
22

23
final class JsonOutput extends AbstractRender
24
{
25
    protected function renderOneEnv(OutputInterface $output, array $changeLog, string $env): void
26
    {
27
        $dataForJson = [$env => []];
8✔
28

29
        foreach ($changeLog as $diff) {
8✔
30
            $row                             = $diff->toArray();
8✔
31
            $dataForJson[$env][$row['name']] = $row;
8✔
32
        }
33

34
        $output->writeln((string)json($dataForJson));
8✔
35
    }
36
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc