Code Duplication    Length = 13-14 lines in 8 locations

src/Exceptions/ErrorCollection.php 8 locations

@@ 136-148 (lines=13) @@
133
     *
134
     * @return $this
135
     */
136
    public function addDataError(
137
        $title,
138
        $detail = null,
139
        $status = null,
140
        $idx = null,
141
        LinkInterface $aboutLink = null,
142
        $code = null,
143
        $meta = null
144
    ) {
145
        $pointer = $this->getPathToData();
146
147
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
148
    }
149
150
    /**
151
     * @param string             $title
@@ 161-173 (lines=13) @@
158
     *
159
     * @return $this
160
     */
161
    public function addDataTypeError(
162
        $title,
163
        $detail = null,
164
        $status = null,
165
        $idx = null,
166
        LinkInterface $aboutLink = null,
167
        $code = null,
168
        $meta = null
169
    ) {
170
        $pointer = $this->getPathToType();
171
172
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
173
    }
174
175
    /**
176
     * @param string             $title
@@ 186-198 (lines=13) @@
183
     *
184
     * @return $this
185
     */
186
    public function addDataIdError(
187
        $title,
188
        $detail = null,
189
        $status = null,
190
        $idx = null,
191
        LinkInterface $aboutLink = null,
192
        $code = null,
193
        $meta = null
194
    ) {
195
        $pointer = $this->getPathToId();
196
197
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
198
    }
199
200
    /**
201
     * @param string             $name
@@ 212-225 (lines=14) @@
209
     *
210
     * @return $this
211
     */
212
    public function addDataAttributeError(
213
        $name,
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->getPathToAttribute($name);
223
224
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
225
    }
226
227
    /**
228
     * @param string             $title
@@ 238-250 (lines=13) @@
235
     *
236
     * @return $this
237
     */
238
    public function addRelationshipsError(
239
        $title,
240
        $detail = null,
241
        $status = null,
242
        $idx = null,
243
        LinkInterface $aboutLink = null,
244
        $code = null,
245
        $meta = null
246
    ) {
247
        $pointer = $this->getPathToRelationships();
248
249
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
250
    }
251
252
    /**
253
     * @param string             $name
@@ 264-277 (lines=14) @@
261
     *
262
     * @return $this
263
     */
264
    public function addRelationshipError(
265
        $name,
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->getPathToRelationship($name);
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 addRelationshipTypeError(
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->getPathToRelationshipType($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 addRelationshipIdError(
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->getPathToRelationshipId($name);
329
330
        return $this->addResourceError($title, $pointer, $detail, $status, $idx, $aboutLink, $code, $meta);
331
    }
332
333
    /**
334
     * @param string             $name