Code Duplication    Length = 8-8 lines in 2 locations

Exception/InvalidMiddlewareException.php 1 location

@@ 31-38 (lines=8) @@
28
     *
29
     * @return InvalidMiddlewareException
30
     */
31
    public static function forUnknownValue($value, Exception $cause = null)
32
    {
33
        return new static(sprintf(
34
            'The object must be an instance of %s. Instance of %s given',
35
            MiddlewareInterface::class,
36
            is_object($value) ? get_class($value) : gettype($value)
37
        ), 0, $cause);
38
    }
39
}
40

Exception/NotFoundException.php 1 location

@@ 33-40 (lines=8) @@
30
     *
31
     * @return NotFoundException
32
     */
33
    protected static function notFound($type, $message, $code = 0, Exception $cause = null)
34
    {
35
        return new static(sprintf(
36
            'Not found a %s for a given object of type %s',
37
            $type,
38
            is_object($message) ? get_class($message) : gettype($message)
39
        ), $code, $cause);
40
    }
41
42
    /**
43
     * @param mixed          $object