Code Duplication    Length = 12-12 lines in 12 locations

src/Paraunit/Parser/JSON/LogPrinter.php 6 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.
@@ 127-138 (lines=12) @@
124
         * @param \Throwable $error
125
         * @param float $time
126
         */
127
        public function addIncompleteTest(Test $test, \Throwable $error, float $time): void
128
        {
129
            $this->writeCase(
130
                self::STATUS_ERROR,
131
                $time,
132
                $this->getStackTrace($error),
133
                self::MESSAGE_INCOMPLETE_TEST . $error->getMessage(),
134
                $test
135
            );
136
137
            $this->currentTestPass = false;
138
        }
139
140
        /**
141
         * Risky test.
@@ 147-158 (lines=12) @@
144
         * @param \Throwable $exception
145
         * @param float $time
146
         */
147
        public function addRiskyTest(Test $test, \Throwable $exception, float $time): void
148
        {
149
            $this->writeCase(
150
                self::STATUS_ERROR,
151
                $time,
152
                $this->getStackTrace($exception),
153
                self::MESSAGE_RISKY_TEST . $exception->getMessage(),
154
                $test
155
            );
156
157
            $this->currentTestPass = false;
158
        }
159
160
        /**
161
         * Skipped test.
@@ 167-178 (lines=12) @@
164
         * @param \Throwable $exception
165
         * @param float $time
166
         */
167
        public function addSkippedTest(Test $test, \Throwable $exception, float $time): void
168
        {
169
            $this->writeCase(
170
                self::STATUS_ERROR,
171
                $time,
172
                $this->getStackTrace($exception),
173
                self::MESSAGE_SKIPPED_TEST . $exception->getMessage(),
174
                $test
175
            );
176
177
            $this->currentTestPass = false;
178
        }
179
180
        /**
181
         * A testsuite started.

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

@@ 80-91 (lines=12) @@
77
     * @param Warning $warning
78
     * @param float $time
79
     */
80
    public function addWarning(Test $test, Warning $warning, $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, $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.
@@ 60-71 (lines=12) @@
57
     * @param \Exception $exception
58
     * @param float $time
59
     */
60
    public function addError(Test $test, \Exception $exception, $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.
@@ 120-131 (lines=12) @@
117
     * @param \Exception $error
118
     * @param float $time
119
     */
120
    public function addIncompleteTest(Test $test, \Exception $error, $time)
121
    {
122
        $this->writeCase(
123
            self::STATUS_ERROR,
124
            $time,
125
            $this->getStackTrace($error),
126
            self::MESSAGE_INCOMPLETE_TEST . $error->getMessage(),
127
            $test
128
        );
129
130
        $this->currentTestPass = false;
131
    }
132
133
    /**
134
     * Risky test.
@@ 140-151 (lines=12) @@
137
     * @param \Exception $exception
138
     * @param float $time
139
     */
140
    public function addRiskyTest(Test $test, \Exception $exception, $time)
141
    {
142
        $this->writeCase(
143
            self::STATUS_ERROR,
144
            $time,
145
            $this->getStackTrace($exception),
146
            self::MESSAGE_RISKY_TEST . $exception->getMessage(),
147
            $test
148
        );
149
150
        $this->currentTestPass = false;
151
    }
152
153
    /**
154
     * Skipped test.
@@ 160-171 (lines=12) @@
157
     * @param \Exception $exception
158
     * @param float $time
159
     */
160
    public function addSkippedTest(Test $test, \Exception $exception, $time)
161
    {
162
        $this->writeCase(
163
            self::STATUS_ERROR,
164
            $time,
165
            $this->getStackTrace($exception),
166
            self::MESSAGE_SKIPPED_TEST . $exception->getMessage(),
167
            $test
168
        );
169
170
        $this->currentTestPass = false;
171
    }
172
173
    /**
174
     * A testsuite started.