| @@ 302-315 (lines=14) @@ | ||
| 299 | * @return string |
|
| 300 | * @throws \InvalidArgumentException |
|
| 301 | */ |
|
| 302 | private function getLogDirectory(): string |
|
| 303 | { |
|
| 304 | $logDirectory = getenv(EnvVariables::LOG_DIR); |
|
| 305 | ||
| 306 | if ($logDirectory === false) { |
|
| 307 | throw new \InvalidArgumentException('Log directory not received: environment variable not set'); |
|
| 308 | } |
|
| 309 | ||
| 310 | if (substr($logDirectory, -1) !== DIRECTORY_SEPARATOR) { |
|
| 311 | $logDirectory .= DIRECTORY_SEPARATOR; |
|
| 312 | } |
|
| 313 | ||
| 314 | return $logDirectory; |
|
| 315 | } |
|
| 316 | ||
| 317 | private function convertToUtf8($string): string |
|
| 318 | { |
|
| @@ 295-308 (lines=14) @@ | ||
| 292 | * @return string |
|
| 293 | * @throws \InvalidArgumentException |
|
| 294 | */ |
|
| 295 | private function getLogDirectory(): string |
|
| 296 | { |
|
| 297 | $logDirectory = getenv(EnvVariables::LOG_DIR); |
|
| 298 | ||
| 299 | if ($logDirectory === false) { |
|
| 300 | throw new \InvalidArgumentException('Log directory not received: environment variable not set'); |
|
| 301 | } |
|
| 302 | ||
| 303 | if (substr($logDirectory, -1) !== DIRECTORY_SEPARATOR) { |
|
| 304 | $logDirectory .= DIRECTORY_SEPARATOR; |
|
| 305 | } |
|
| 306 | ||
| 307 | return $logDirectory; |
|
| 308 | } |
|
| 309 | ||
| 310 | private function convertToUtf8($string): string |
|
| 311 | { |
|