Completed
Push — master ( b32211...02f97d )
by Alessandro
02:47
created
src/Paraunit/Parser/JSON/LogPrinter.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -297,6 +297,9 @@
 block discarded – undo
297 297
         return $logDirectory;
298 298
     }
299 299
 
300
+    /**
301
+     * @param string $string
302
+     */
300 303
     private function convertToUtf8($string): string
301 304
     {
302 305
         if (! $this->isUtf8($string)) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Paraunit\Parser\JSON;
5 5
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      */
241 241
     private function writeArray($buffer)
242 242
     {
243
-        array_walk_recursive($buffer, function (&$input) {
243
+        array_walk_recursive($buffer, function(&$input) {
244 244
             if (is_string($input)) {
245 245
                 $input = $this->convertToUtf8($input);
246 246
             }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
     private function getLogFilename(): string
267 267
     {
268 268
         $logDir = $this->getLogDirectory();
269
-        if (! @mkdir($logDir, 0777, true) && ! is_dir($logDir)) {
269
+        if ( ! @mkdir($logDir, 0777, true) && ! is_dir($logDir)) {
270 270
             throw new \RuntimeException('Cannot create folder for JSON logs');
271 271
         }
272 272
 
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 
300 300
     private function convertToUtf8($string): string
301 301
     {
302
-        if (! $this->isUtf8($string)) {
302
+        if ( ! $this->isUtf8($string)) {
303 303
             if (\function_exists('mb_convert_encoding')) {
304 304
                 return \mb_convert_encoding($string, 'UTF-8');
305 305
             }
Please login to merge, or discard this patch.