Code Duplication    Length = 8-8 lines in 2 locations

src/Paraunit/Parser/JSON/LogPrinterV6.php 1 location

@@ 262-269 (lines=8) @@
259
        $this->writeToLog(json_encode($buffer, JSON_PRETTY_PRINT));
260
    }
261
262
    private function writeToLog($buffer)
263
    {
264
        // ignore everything that is not a JSON object
265
        if ($buffer != '' && $buffer[0] === '{') {
266
            \fwrite($this->logFile, $buffer);
267
            \fflush($this->logFile);
268
        }
269
    }
270
271
    /**
272
     * @return string

src/Paraunit/Parser/JSON/LogPrinter.php 1 location

@@ 273-280 (lines=8) @@
270
            $this->writeToLog(json_encode($buffer, JSON_PRETTY_PRINT));
271
        }
272
273
        private function writeToLog($buffer)
274
        {
275
            // ignore everything that is not a JSON object
276
            if ($buffer != '' && $buffer[0] === '{') {
277
                \fwrite($this->logFile, $buffer);
278
                \fflush($this->logFile);
279
            }
280
        }
281
282
        /**
283
         * @return string