mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 08:05:34 +08:00
add cs fixer and PHPStan and activate it (build 436)
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
class AnnotationException extends \Doctrine\Common\Annotations\AnnotationException
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
use Throwable;
|
||||
|
||||
class DbException extends ZMKnownException
|
||||
{
|
||||
public function __construct($message = "", $code = 0, Throwable $previous = null) {
|
||||
parent::__construct("E00043", $message, $code, $previous);
|
||||
public function __construct($message = '', $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct('E00043', $message, $code, $previous);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
/**
|
||||
* 这里放所有框架内部的异常处理方法
|
||||
* Class ExceptionHandler
|
||||
* @package ZM\Exception
|
||||
* @since 2.5
|
||||
*/
|
||||
class ExceptionHandler
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
class InitException extends ZMException
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
use Throwable;
|
||||
|
||||
class InterruptException extends ZMException
|
||||
{
|
||||
public $return_var = null;
|
||||
public $return_var;
|
||||
|
||||
public function __construct($return_var = null, $message = "", $code = 0, Throwable $previous = null) {
|
||||
public function __construct($return_var = null, $message = '', $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
$this->return_var = $return_var;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
class InvalidArgumentException extends ZMException
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
use Throwable;
|
||||
|
||||
class LightCacheException extends ZMKnownException
|
||||
{
|
||||
public function __construct($err_code, $message = "", $code = 0, Throwable $previous = null) {
|
||||
public function __construct($err_code, $message = '', $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct($err_code, $message, $code, $previous);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
use Throwable;
|
||||
|
||||
class ModulePackException extends ZMException
|
||||
{
|
||||
public function __construct($message = "", $code = 0, Throwable $previous = null) {
|
||||
parent::__construct(zm_internal_errcode("E00044") . $message, $code, $previous);
|
||||
public function __construct($message = '', $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(zm_internal_errcode('E00044') . $message, $code, $previous);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
use Throwable;
|
||||
|
||||
class NotInitializedException extends RedisException
|
||||
{
|
||||
public function __construct($message = "", $code = 0, Throwable $previous = null) {
|
||||
parent::__construct(zm_internal_errcode("E00046") . $message, $code, $previous);
|
||||
public function __construct($message = '', $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(zm_internal_errcode('E00046') . $message, $code, $previous);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
class RedisException extends ZMException
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Class RobotNotFoundException
|
||||
* @package ZM\Exception
|
||||
* @since 1.2
|
||||
*/
|
||||
class RobotNotFoundException extends ZMException
|
||||
{
|
||||
public function __construct($message = "", $code = 0, Throwable $previous = null) {
|
||||
parent::__construct(zm_internal_errcode("E00037") . $message, $code, $previous);
|
||||
public function __construct($message = '', $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(zm_internal_errcode('E00037') . $message, $code, $previous);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
use Throwable;
|
||||
|
||||
class WaitTimeoutException extends ZMException
|
||||
{
|
||||
public $module;
|
||||
|
||||
public function __construct($module, $message = "", $code = 0, Throwable $previous = null) {
|
||||
public function __construct($module, $message = '', $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
$this->module = $module;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
use Exception;
|
||||
|
||||
abstract class ZMException extends Exception
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Exception;
|
||||
|
||||
|
||||
use Throwable;
|
||||
|
||||
class ZMKnownException extends ZMException
|
||||
{
|
||||
public function __construct($err_code, $message = "", $code = 0, Throwable $previous = null) {
|
||||
public function __construct($err_code, $message = '', $code = 0, Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(zm_internal_errcode($err_code) . $message, $code, $previous);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user