Code Duplication    Length = 12-12 lines in 6 locations

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

@@ 62-73 (lines=12) @@
59
     * @param \Exception $e
60
     * @param float $time
61
     */
62
    public function addError(Test $test, \Exception $e, $time)
63
    {
64
        $this->writeCase(
65
            'error',
66
            $time,
67
            Util\Filter::getFilteredStacktrace($e, false),
68
            TestFailure::exceptionToString($e),
69
            $test
70
        );
71
72
        $this->currentTestPass = false;
73
    }
74
75
    /**
76
     * A warning occurred.
@@ 82-93 (lines=12) @@
79
     * @param Warning $e
80
     * @param float $time
81
     */
82
    public function addWarning(Test $test, Warning $e, $time)
83
    {
84
        $this->writeCase(
85
            'warning',
86
            $time,
87
            Util\Filter::getFilteredStacktrace($e, false),
88
            TestFailure::exceptionToString($e),
89
            $test
90
        );
91
92
        $this->currentTestPass = false;
93
    }
94
95
    /**
96
     * A failure occurred.
@@ 102-113 (lines=12) @@
99
     * @param AssertionFailedError $e
100
     * @param float $time
101
     */
102
    public function addFailure(Test $test, AssertionFailedError $e, $time)
103
    {
104
        $this->writeCase(
105
            'fail',
106
            $time,
107
            Util\Filter::getFilteredStacktrace($e, false),
108
            TestFailure::exceptionToString($e),
109
            $test
110
        );
111
112
        $this->currentTestPass = false;
113
    }
114
115
    /**
116
     * Incomplete test.
@@ 122-133 (lines=12) @@
119
     * @param \Exception $e
120
     * @param float $time
121
     */
122
    public function addIncompleteTest(Test $test, \Exception $e, $time)
123
    {
124
        $this->writeCase(
125
            'error',
126
            $time,
127
            Util\Filter::getFilteredStacktrace($e, false),
128
            'Incomplete Test: ' . $e->getMessage(),
129
            $test
130
        );
131
132
        $this->currentTestPass = false;
133
    }
134
135
    /**
136
     * Risky test.
@@ 142-153 (lines=12) @@
139
     * @param \Exception $e
140
     * @param float $time
141
     */
142
    public function addRiskyTest(Test $test, \Exception $e, $time)
143
    {
144
        $this->writeCase(
145
            'error',
146
            $time,
147
            Util\Filter::getFilteredStacktrace($e, false),
148
            'Risky Test: ' . $e->getMessage(),
149
            $test
150
        );
151
152
        $this->currentTestPass = false;
153
    }
154
155
    /**
156
     * Skipped test.
@@ 162-173 (lines=12) @@
159
     * @param \Exception $e
160
     * @param float $time
161
     */
162
    public function addSkippedTest(Test $test, \Exception $e, $time)
163
    {
164
        $this->writeCase(
165
            'error',
166
            $time,
167
            Util\Filter::getFilteredStacktrace($e, false),
168
            'Skipped Test: ' . $e->getMessage(),
169
            $test
170
        );
171
172
        $this->currentTestPass = false;
173
    }
174
175
    /**
176
     * A testsuite started.