src/ProcessOutput.php
private function stringToArray(string $string): array
    {
        $lines = preg_split('/\R/', $string);
        if (1 === count($lines) && '' === $lines[0]) {
            $lines = [];
        }

        return $lines;
    }
private function stringToArray(string $string): array
    {
        $lines = preg_split('/\R/', $string);
        if (1 === count($lines) && '' === $lines[0]) {
            $lines = [];
        }

        return $lines;
    }
Accepts console output as a string and returns an array of it split by newlines.