Code Duplication    Length = 16-16 lines in 2 locations

src/Exception/AttributeNotFoundException.php 1 location

@@ 13-28 (lines=16) @@
10
 *
11
 * @package Mikemirten\Component\JsonApi\Exception
12
 */
13
class AttributeNotFoundException extends JsonApiException
14
{
15
    /**
16
     * AttributeNotFoundException constructor.
17
     *
18
     * @param ResourceObject  $resource
19
     * @param string          $name
20
     * @param \Exception|null $previous
21
     */
22
    public function __construct(ResourceObject $resource, string $name, \Exception $previous = null)
23
    {
24
        $message = sprintf('Attribute "%s" not found inside of [%s].', $name, $resource);
25
26
        parent::__construct($message, 0, $previous);
27
    }
28
}

src/Exception/AttributeOverrideException.php 1 location

@@ 13-28 (lines=16) @@
10
 *
11
 * @package Mikemirten\Component\JsonApi\Exception
12
 */
13
class AttributeOverrideException extends JsonApiException
14
{
15
    /**
16
     * AttributeOverrideException constructor.
17
     *
18
     * @param ResourceObject  $resource
19
     * @param string          $name
20
     * @param \Exception|null $previous
21
     */
22
    public function __construct(ResourceObject $resource, string $name, \Exception $previous = null)
23
    {
24
        $message = sprintf('Attribute "%s" already exists inside of [%s]. To set new one, the old one must be removed.', $name, $resource);
25
26
        parent::__construct($message, 0, $previous);
27
    }
28
}