src/Hal/Report/Csv/Reporter.php 1 location
|
@@ 46-48 (lines=3) @@
|
| 43 |
|
if (!$logFile) { |
| 44 |
|
return; |
| 45 |
|
} |
| 46 |
|
if (!file_exists(dirname($logFile)) || !is_writable(dirname($logFile))) { |
| 47 |
|
throw new \RuntimeException('You don\'t have permissions to write CSV report in ' . $logFile); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
$availables = (new Registry())->allForStructures(); |
| 51 |
|
$hwnd = fopen($logFile, 'w'); |
src/Hal/Report/Json/Reporter.php 1 location
|
@@ 44-46 (lines=3) @@
|
| 41 |
|
if (!$logFile) { |
| 42 |
|
return; |
| 43 |
|
} |
| 44 |
|
if (!file_exists(dirname($logFile)) || !is_writable(dirname($logFile))) { |
| 45 |
|
throw new \RuntimeException('You don\'t have permissions to write JSON report in ' . $logFile); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
file_put_contents($logFile, json_encode($metrics, JSON_PRETTY_PRINT)); |
| 49 |
|
} |