Code Duplication    Length = 9-12 lines in 5 locations

lib/ClientError.php 1 location

@@ 19-28 (lines=10) @@
16
 *
17
 * @codeCoverageIgnore
18
 */
19
class ClientError extends \Exception implements Exception
20
{
21
	/**
22
	 * @inheritdoc
23
	 */
24
	public function __construct($message = null, $code = Status::BAD_REQUEST, \Exception $previous = null)
25
	{
26
		parent::__construct($message, $code, $previous);
27
	}
28
}
29

lib/DispatcherProviderNotDefined.php 1 location

@@ 17-25 (lines=9) @@
14
/**
15
 * Exception thrown in attempt to obtain a dispatcher when no provider is defined.
16
 */
17
class DispatcherProviderNotDefined extends \LogicException implements Exception
18
{
19
	const DEFAULT_MESSAGE = "No provider is defined yet. Please define one with `DispatcherProvider::define(\$provider)`.";
20
21
    /**
22
     * @inheritdoc
23
     */
24
	public function __construct($message = self::DEFAULT_MESSAGE, $code = Status::INTERNAL_SERVER_ERROR, \Exception $previous = null)
25
	{
26
		parent::__construct($message, $code, $previous);
27
	}
28
}

lib/ServerError.php 1 location

@@ 19-28 (lines=10) @@
16
 *
17
 * @codeCoverageIgnore
18
 */
19
class ServerError extends \Exception implements Exception
20
{
21
	/**
22
	 * @inheritdoc
23
	 */
24
	public function __construct($message = null, $code = Status::INTERNAL_SERVER_ERROR, \Exception $previous = null)
25
	{
26
		parent::__construct($message, $code, $previous);
27
	}
28
}
29

lib/NotFound.php 1 location

@@ 17-28 (lines=12) @@
14
/**
15
 * Exception thrown when a resource is not found.
16
 */
17
class NotFound extends ClientError implements Exception
18
{
19
    const DEFAULT_MESSAGE = "The requested URL was not found on this server.";
20
21
	/**
22
	 * @inheritdoc
23
	 */
24
	public function __construct($message = self::DEFAULT_MESSAGE, $code = Status::NOT_FOUND, \Exception $previous = null)
25
	{
26
		parent::__construct($message, $code, $previous);
27
	}
28
}
29

lib/ServiceUnavailable.php 1 location

@@ 18-29 (lines=12) @@
15
 * Exception thrown when the server is currently unavailable (because it is overloaded or
16
 * down for maintenance).
17
 */
18
class ServiceUnavailable extends ServerError implements Exception
19
{
20
    const DEFAULT_MESSAGE = "The server is currently unavailable (because it is overloaded or down for maintenance).";
21
22
	/**
23
	 * @inheritdoc
24
	 */
25
	public function __construct($message = self::DEFAULT_MESSAGE, $code = Status::SERVICE_UNAVAILABLE, \Exception $previous = null)
26
	{
27
		parent::__construct($message, $code, $previous);
28
	}
29
}
30