@@ -292,6 +292,9 @@ |
||
| 292 | 292 | return $this->logDirectory; |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | + /** |
|
| 296 | + * @param string $string |
|
| 297 | + */ |
|
| 295 | 298 | private function convertToUtf8($string): string |
| 296 | 299 | { |
| 297 | 300 | if (! $this->isUtf8($string)) { |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Paraunit\Parser\JSON; |
| 5 | 5 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $logFilename = $this->getLogFilename(); |
| 46 | 46 | |
| 47 | 47 | $logDir = $this->getLogDirectory(); |
| 48 | - if (! @mkdir($logDir, 0777, true) && ! is_dir($logDir)) { |
|
| 48 | + if ( ! @mkdir($logDir, 0777, true) && ! is_dir($logDir)) { |
|
| 49 | 49 | throw new \RuntimeException('Cannot create folder for JSON logs'); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | */ |
| 255 | 255 | public function writeArray($buffer) |
| 256 | 256 | { |
| 257 | - array_walk_recursive($buffer, function (&$input) { |
|
| 257 | + array_walk_recursive($buffer, function(&$input) { |
|
| 258 | 258 | if (is_string($input)) { |
| 259 | 259 | $input = $this->convertToUtf8($input); |
| 260 | 260 | } |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | |
| 302 | 302 | private function convertToUtf8($string): string |
| 303 | 303 | { |
| 304 | - if (! $this->isUtf8($string)) { |
|
| 304 | + if ( ! $this->isUtf8($string)) { |
|
| 305 | 305 | if (\function_exists('mb_convert_encoding')) { |
| 306 | 306 | return \mb_convert_encoding($string, 'UTF-8'); |
| 307 | 307 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Paraunit\Lifecycle; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Paraunit\File; |
| 5 | 5 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | return; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - if (!mkdir($path) && !is_dir($path)) { |
|
| 82 | + if ( ! mkdir($path) && ! is_dir($path)) { |
|
| 83 | 83 | throw new \RuntimeException('Unable to create temporary directory ' . $path); |
| 84 | 84 | } |
| 85 | 85 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Paraunit\File; |
| 5 | 5 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | public static function cleanUpDir(string $dir): bool |
| 49 | 49 | { |
| 50 | - if (! file_exists($dir)) { |
|
| 50 | + if ( ! file_exists($dir)) { |
|
| 51 | 51 | return false; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Paraunit\Coverage; |
| 5 | 5 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | private function coverageFileIsValid(string $tempFilename): bool |
| 55 | 55 | { |
| 56 | - if (! file_exists($tempFilename)) { |
|
| 56 | + if ( ! file_exists($tempFilename)) { |
|
| 57 | 57 | return false; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Paraunit\Coverage\Processor; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Paraunit\Coverage; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Paraunit\Configuration; |
| 5 | 5 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function getPhpDbgBin(): string |
| 30 | 30 | { |
| 31 | - if (! $this->isAvailable()) { |
|
| 31 | + if ( ! $this->isAvailable()) { |
|
| 32 | 32 | throw new \RuntimeException('PHPDbg is not available!'); |
| 33 | 33 | } |
| 34 | 34 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Paraunit\Configuration; |
| 5 | 5 | |