type fixes

This commit is contained in:
Yuri Kuznetsov
2022-03-06 10:34:46 +02:00
parent 03131507bc
commit 9449d8364b
12 changed files with 39 additions and 1 deletions

View File

@@ -31,5 +31,8 @@ namespace Espo\Core\Exceptions;
class BadRequest extends \Exception
{
/**
* @var int
*/
protected $code = 400;
}

View File

@@ -34,8 +34,14 @@ use Throwable;
class Conflict extends Exception implements HasBody
{
/**
* @var int
*/
protected $code = 409;
/**
* @var ?string
*/
private $body = null;
final public function __construct(string $message = '', int $code = 0, Throwable $previous = null)

View File

@@ -31,5 +31,8 @@ namespace Espo\Core\Exceptions;
class ConflictSilent extends Conflict
{
/**
* @var string
*/
public $logLevel = 'notice';
}

View File

@@ -33,6 +33,9 @@ use Throwable;
class Error extends InternalServerError implements HasBody
{
/**
* @var ?string
*/
private $body = null;
final public function __construct(string $message = '', int $code = 0, Throwable $previous = null)

View File

@@ -31,5 +31,8 @@ namespace Espo\Core\Exceptions;
class ErrorSilent extends Error
{
/**
* @var string
*/
public $logLevel = 'notice';
}

View File

@@ -31,6 +31,8 @@ namespace Espo\Core\Exceptions;
class Forbidden extends \Exception
{
/**
* @var int
*/
protected $code = 403;
}

View File

@@ -31,5 +31,8 @@ namespace Espo\Core\Exceptions;
class ForbiddenSilent extends Forbidden
{
/**
* @var string
*/
public $logLevel = 'notice';
}

View File

@@ -31,5 +31,8 @@ namespace Espo\Core\Exceptions;
class InternalServerError extends \Exception
{
/**
* @var int
*/
protected $code = 500;
}

View File

@@ -31,5 +31,8 @@ namespace Espo\Core\Exceptions;
class NotFound extends \Exception
{
/**
* @var int
*/
protected $code = 404;
}

View File

@@ -31,5 +31,8 @@ namespace Espo\Core\Exceptions;
class NotFoundSilent extends NotFound
{
/**
* @var string
*/
public $logLevel = 'notice';
}

View File

@@ -31,5 +31,8 @@ namespace Espo\Core\Exceptions;
class ServiceUnavailable extends \Exception
{
/**
* @var int
*/
protected $code = 503;
}

View File

@@ -31,5 +31,8 @@ namespace Espo\Core\Exceptions;
class Unauthorized extends \Exception
{
/**
* @var int
*/
protected $code = 401;
}