改名
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Annotation\Route;
|
|||||||
|
|
||||||
|
|
||||||
use Annotation\IAnnotation;
|
use Annotation\IAnnotation;
|
||||||
|
use JetBrains\PhpStorm\Pure;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Snowflake\Exception\NotFindClassException;
|
use Snowflake\Exception\NotFindClassException;
|
||||||
use Snowflake\Snowflake;
|
use Snowflake\Snowflake;
|
||||||
@@ -23,10 +24,10 @@ use Snowflake\Snowflake;
|
|||||||
* @param \HttpServer\IInterface\After|\HttpServer\IInterface\After[] $after
|
* @param \HttpServer\IInterface\After|\HttpServer\IInterface\After[] $after
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public function __construct(public string|array $after)
|
#[Pure] public function __construct(public string|array $after)
|
||||||
{
|
{
|
||||||
if (is_string($this->after)) {
|
if (is_string($this->after)) {
|
||||||
$this->after = [];
|
$this->after = [$this->after];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ use Snowflake\Snowflake;
|
|||||||
#[Pure] public function __construct(public string|array $interceptor)
|
#[Pure] public function __construct(public string|array $interceptor)
|
||||||
{
|
{
|
||||||
if (is_string($this->interceptor)) {
|
if (is_string($this->interceptor)) {
|
||||||
$this->interceptor = [];
|
$this->interceptor = [$this->interceptor];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace Annotation\Route;
|
|||||||
|
|
||||||
|
|
||||||
use Annotation\IAnnotation;
|
use Annotation\IAnnotation;
|
||||||
|
use JetBrains\PhpStorm\Pure;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Snowflake\Exception\NotFindClassException;
|
use Snowflake\Exception\NotFindClassException;
|
||||||
use Snowflake\Snowflake;
|
use Snowflake\Snowflake;
|
||||||
@@ -23,10 +24,10 @@ use Snowflake\Snowflake;
|
|||||||
* @param string|array $limits
|
* @param string|array $limits
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public function __construct(public string|array $limits)
|
#[Pure] public function __construct(public string|array $limits)
|
||||||
{
|
{
|
||||||
if (is_string($this->limits)) {
|
if (is_string($this->limits)) {
|
||||||
$this->limits = [];
|
$this->limits = [$this->limits];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ use Snowflake\Snowflake;
|
|||||||
* @param string|array $middleware
|
* @param string|array $middleware
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public function __construct(public string|array $middleware)
|
#[Pure] public function __construct(public string|array $middleware)
|
||||||
{
|
{
|
||||||
if (is_string($this->middleware)) {
|
if (is_string($this->middleware)) {
|
||||||
$this->middleware = [];
|
$this->middleware = [$this->middleware];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user