Code Duplication    Length = 12-12 lines in 6 locations

src/Paraunit/Parser/JSON/LogPrinter.php 3 locations

@@ 67-78 (lines=12) @@
64
         * @param \Throwable $exception
65
         * @param float $time
66
         */
67
        public function addError(Test $test, \Throwable $exception, float $time): void
68
        {
69
            $this->writeCase(
70
                self::STATUS_ERROR,
71
                $time,
72
                $this->getStackTrace($exception),
73
                TestFailure::exceptionToString($exception),
74
                $test
75
            );
76
    
77
            $this->currentTestPass = false;
78
        }
79
    
80
        /**
81
         * A warning occurred.
@@ 87-98 (lines=12) @@
84
         * @param Warning $warning
85
         * @param float $time
86
         */
87
        public function addWarning(Test $test, Warning $warning, float $time): void
88
        {
89
            $this->writeCase(
90
                self::STATUS_WARNING,
91
                $time,
92
                $this->getStackTrace($warning),
93
                TestFailure::exceptionToString($warning),
94
                $test
95
            );
96
    
97
            $this->currentTestPass = false;
98
        }
99
    
100
        /**
101
         * A failure occurred.
@@ 107-118 (lines=12) @@
104
         * @param AssertionFailedError $error
105
         * @param float $time
106
         */
107
        public function addFailure(Test $test, AssertionFailedError $error, float $time): void
108
        {
109
            $this->writeCase(
110
                self::STATUS_FAIL,
111
                $time,
112
                $this->getStackTrace($error),
113
                TestFailure::exceptionToString($error),
114
                $test
115
            );
116
    
117
            $this->currentTestPass = false;
118
        }
119
    
120
        /**
121
         * Incomplete test.

src/Paraunit/Parser/JSON/LogPrinterV6.php 3 locations

@@ 60-71 (lines=12) @@
57
     * @param \Throwable $exception
58
     * @param float $time
59
     */
60
    public function addError(Test $test, \Throwable $exception, float $time)
61
    {
62
        $this->writeCase(
63
            self::STATUS_ERROR,
64
            $time,
65
            $this->getStackTrace($exception),
66
            TestFailure::exceptionToString($exception),
67
            $test
68
        );
69
70
        $this->currentTestPass = false;
71
    }
72
73
    /**
74
     * A warning occurred.
@@ 80-91 (lines=12) @@
77
     * @param Warning $warning
78
     * @param float $time
79
     */
80
    public function addWarning(Test $test, Warning $warning, float $time)
81
    {
82
        $this->writeCase(
83
            self::STATUS_WARNING,
84
            $time,
85
            $this->getStackTrace($warning),
86
            TestFailure::exceptionToString($warning),
87
            $test
88
        );
89
90
        $this->currentTestPass = false;
91
    }
92
93
    /**
94
     * A failure occurred.
@@ 100-111 (lines=12) @@
97
     * @param AssertionFailedError $error
98
     * @param float $time
99
     */
100
    public function addFailure(Test $test, AssertionFailedError $error, float $time)
101
    {
102
        $this->writeCase(
103
            self::STATUS_FAIL,
104
            $time,
105
            $this->getStackTrace($error),
106
            TestFailure::exceptionToString($error),
107
            $test
108
        );
109
110
        $this->currentTestPass = false;
111
    }
112
113
    /**
114
     * Incomplete test.