Code Duplication    Length = 13-14 lines in 9 locations

src/Exceptions/ErrorCollection.php 9 locations

@@ 138-150 (lines=13) @@
135
     *
136
     * @return $this
137
     */
138
    public function addDataError(
139
        $title,
140
        $detail = null,
141
        $status = null,
142
        $idx = null,
143
        LinkInterface $aboutLink = null,
144
        $code = null,
145
        $meta = null
146
    ) {
147
        $pointer = $this->getPathToData();
148
149
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
150
    }
151
152
    /**
153
     * @param string             $title
@@ 163-175 (lines=13) @@
160
     *
161
     * @return $this
162
     */
163
    public function addDataTypeError(
164
        $title,
165
        $detail = null,
166
        $status = null,
167
        $idx = null,
168
        LinkInterface $aboutLink = null,
169
        $code = null,
170
        $meta = null
171
    ) {
172
        $pointer = $this->getPathToType();
173
174
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
175
    }
176
177
    /**
178
     * @param string             $title
@@ 188-200 (lines=13) @@
185
     *
186
     * @return $this
187
     */
188
    public function addDataIdError(
189
        $title,
190
        $detail = null,
191
        $status = null,
192
        $idx = null,
193
        LinkInterface $aboutLink = null,
194
        $code = null,
195
        $meta = null
196
    ) {
197
        $pointer = $this->getPathToId();
198
199
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
200
    }
201
202
    /**
203
     * @param string             $title
@@ 213-225 (lines=13) @@
210
     *
211
     * @return $this
212
     */
213
    public function addAttributesError(
214
        $title,
215
        $detail = null,
216
        $status = null,
217
        $idx = null,
218
        LinkInterface $aboutLink = null,
219
        $code = null,
220
        $meta = null
221
    ) {
222
        $pointer = $this->getPathToAttributes();
223
224
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
225
    }
226
227
    /**
228
     * @param string             $name
@@ 239-252 (lines=14) @@
236
     *
237
     * @return $this
238
     */
239
    public function addDataAttributeError(
240
        $name,
241
        $title,
242
        $detail = null,
243
        $status = null,
244
        $idx = null,
245
        LinkInterface $aboutLink = null,
246
        $code = null,
247
        $meta = null
248
    ) {
249
        $pointer = $this->getPathToAttribute($name);
250
251
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
252
    }
253
254
    /**
255
     * @param string             $title
@@ 265-277 (lines=13) @@
262
     *
263
     * @return $this
264
     */
265
    public function addRelationshipsError(
266
        $title,
267
        $detail = null,
268
        $status = null,
269
        $idx = null,
270
        LinkInterface $aboutLink = null,
271
        $code = null,
272
        $meta = null
273
    ) {
274
        $pointer = $this->getPathToRelationships();
275
276
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
277
    }
278
279
    /**
280
     * @param string             $name
@@ 291-304 (lines=14) @@
288
     *
289
     * @return $this
290
     */
291
    public function addRelationshipError(
292
        $name,
293
        $title,
294
        $detail = null,
295
        $status = null,
296
        $idx = null,
297
        LinkInterface $aboutLink = null,
298
        $code = null,
299
        $meta = null
300
    ) {
301
        $pointer = $this->getPathToRelationship($name);
302
303
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
304
    }
305
306
    /**
307
     * @param string             $name
@@ 318-331 (lines=14) @@
315
     *
316
     * @return $this
317
     */
318
    public function addRelationshipTypeError(
319
        $name,
320
        $title,
321
        $detail = null,
322
        $status = null,
323
        $idx = null,
324
        LinkInterface $aboutLink = null,
325
        $code = null,
326
        $meta = null
327
    ) {
328
        $pointer = $this->getPathToRelationshipType($name);
329
330
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
331
    }
332
333
    /**
334
     * @param string             $name
@@ 345-358 (lines=14) @@
342
     *
343
     * @return $this
344
     */
345
    public function addRelationshipIdError(
346
        $name,
347
        $title,
348
        $detail = null,
349
        $status = null,
350
        $idx = null,
351
        LinkInterface $aboutLink = null,
352
        $code = null,
353
        $meta = null
354
    ) {
355
        $pointer = $this->getPathToRelationshipId($name);
356
357
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
358
    }
359
360
    /**
361
     * @param string             $name