Code Duplication    Length = 13-14 lines in 7 locations

src/Exceptions/ErrorCollection.php 7 locations

@@ 143-155 (lines=13) @@
140
     *
141
     * @return $this
142
     */
143
    public function addDataError(
144
        $title,
145
        $detail = null,
146
        $status = null,
147
        $idx = null,
148
        LinkInterface $aboutLink = null,
149
        $code = null,
150
        $meta = null
151
    ) {
152
        $pointer = $this->getPathToData();
153
154
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
155
    }
156
157
    /**
158
     * @param string             $title
@@ 168-180 (lines=13) @@
165
     *
166
     * @return $this
167
     */
168
    public function addDataTypeError(
169
        $title,
170
        $detail = null,
171
        $status = null,
172
        $idx = null,
173
        LinkInterface $aboutLink = null,
174
        $code = null,
175
        $meta = null
176
    ) {
177
        $pointer = $this->getPathToType();
178
179
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
180
    }
181
182
    /**
183
     * @param string             $title
@@ 193-205 (lines=13) @@
190
     *
191
     * @return $this
192
     */
193
    public function addDataIdError(
194
        $title,
195
        $detail = null,
196
        $status = null,
197
        $idx = null,
198
        LinkInterface $aboutLink = null,
199
        $code = null,
200
        $meta = null
201
    ) {
202
        $pointer = $this->getPathToId();
203
204
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
205
    }
206
207
    /**
208
     * @param string             $name
@@ 219-232 (lines=14) @@
216
     *
217
     * @return $this
218
     */
219
    public function addDataAttributeError(
220
        $name,
221
        $title,
222
        $detail = null,
223
        $status = null,
224
        $idx = null,
225
        LinkInterface $aboutLink = null,
226
        $code = null,
227
        $meta = null
228
    ) {
229
        $pointer = $this->getPathToAttribute($name);
230
231
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
232
    }
233
234
    /**
235
     * @param string             $name
@@ 246-259 (lines=14) @@
243
     *
244
     * @return $this
245
     */
246
    public function addRelationshipError(
247
        $name,
248
        $title,
249
        $detail = null,
250
        $status = null,
251
        $idx = null,
252
        LinkInterface $aboutLink = null,
253
        $code = null,
254
        $meta = null
255
    ) {
256
        $pointer = $this->getPathToRelationship($name);
257
258
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
259
    }
260
261
    /**
262
     * @param string             $name
@@ 273-286 (lines=14) @@
270
     *
271
     * @return $this
272
     */
273
    public function addRelationshipTypeError(
274
        $name,
275
        $title,
276
        $detail = null,
277
        $status = null,
278
        $idx = null,
279
        LinkInterface $aboutLink = null,
280
        $code = null,
281
        $meta = null
282
    ) {
283
        $pointer = $this->getPathToRelationshipType($name);
284
285
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
286
    }
287
288
    /**
289
     * @param string             $name
@@ 300-313 (lines=14) @@
297
     *
298
     * @return $this
299
     */
300
    public function addRelationshipIdError(
301
        $name,
302
        $title,
303
        $detail = null,
304
        $status = null,
305
        $idx = null,
306
        LinkInterface $aboutLink = null,
307
        $code = null,
308
        $meta = null
309
    ) {
310
        $pointer = $this->getPathToRelationshipId($name);
311
312
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
313
    }
314
315
    /**
316
     * @param string             $name