Code Duplication    Length = 8-8 lines in 4 locations

src/Gabrieljmj/Should/Exception/ClassDoesNotExistException.php 1 location

@@ 15-22 (lines=8) @@
12
13
use Gabrieljmj\Should\Exception\ExceptionCodes;
14
15
class ClassDoesNotExistException extends \InvalidArgumentException
16
{
17
    public static function trigger($class)
18
    {
19
        $class = is_object($class) ? get_class($class) : $class;
20
        throw new ClassDoesNotExistException('The class ' . $class . ' does not exist', ExceptionCodes::CLASS_DOES_NOT_EXIST);
21
    }
22
}

src/Gabrieljmj/Should/Exception/MethodDoesNotExistException.php 1 location

@@ 15-22 (lines=8) @@
12
13
use Gabrieljmj\Should\Exception\ExceptionCodes;
14
15
class MethodDoesNotExistException extends \InvalidArgumentException
16
{
17
    public static function trigger($class, $method)
18
    {
19
        $class = is_object($class) ? get_class($class) : $class;
20
        throw new MethodDoesNotExistException('The method ' . $class . '::' . $method . ' does not exist', ExceptionCodes::METHOD_DOES_NOT_EXIST);
21
    }
22
}

src/Gabrieljmj/Should/Exception/ParameterDoesNotExistException.php 1 location

@@ 15-22 (lines=8) @@
12
13
use Gabrieljmj\Should\Exception\ExceptionCodes;
14
15
class ParameterDoesNotExistException extends \InvalidArgumentException
16
{
17
    public static function trigger($class, $method, $parameter)
18
    {
19
        $class = is_object($class) ? get_class($class) : $class;
20
        throw new ParameterDoesNotExistException('The parameter ' . $parameter . ' does not exist on method ' . $class . '::' . $method, ExceptionCodes::METHOD_PARAMETER_DOES_NOT_EXIST);
21
    }
22
}

src/Gabrieljmj/Should/Exception/PropertyDoesNotExistException.php 1 location

@@ 15-22 (lines=8) @@
12
13
use Gabrieljmj\Should\Exception\ExceptionCodes;
14
15
class PropertyDoesNotExistException extends \InvalidArgumentException
16
{
17
    public static function trigger($class, $property)
18
    {
19
        $class = is_object($class) ? get_class($class) : $class;
20
        throw new PropertyDoesNotExistException('The property ' . $class . '::$' . $property . ' does not exist', ExceptionCodes::PROPERTY_DOES_NOT_EXIST);
21
    }
22
}