location['file'] ?? 'unknown'; $line = $v->location['line'] ?? 0; fputcsv($out, [ $v->ruleId, $v->severity->value, $v->standard->value, $file, $line, $v->message, $v->htmlSnippet, $v->fixSuggestion ], ',', '"', '\\'); } rewind($out); $csv = stream_get_contents($out); fclose($out); $io->write($csv ?: ''); return empty($violations) ? Command::SUCCESS : Command::FAILURE; } }