Pyrech\ComposerChangelogs\Outputter::getOutput PHP Method

getOutput() public method

public getOutput ( ) : string
return string
    public function getOutput()
    {
        $output = [];
        if ($this->isEmpty()) {
            $output[] = '<fg=green>No changelogs summary</fg=green>';
        } else {
            $output[] = '<fg=green>Changelogs summary:</fg=green>';
            foreach ($this->operations as $operation) {
                $this->createOperationOutput($output, $operation);
            }
            $output[] = '';
        }
        return implode("\n", $output);
    }

Usage Example

コード例 #1
0
    public function test_it_outputs_nothing_without_operation()
    {
        $expectedOutput = <<<TEXT
<fg=green>No changelogs summary</fg=green>
TEXT;
        $this->assertSame($expectedOutput, $this->SUT->getOutput());
    }
All Usage Examples Of Pyrech\ComposerChangelogs\Outputter::getOutput