This commit is contained in:
2021-02-23 14:54:47 +08:00
parent 5431a1de6c
commit 7dcfd45986
4 changed files with 9 additions and 7 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ namespace Annotation\Route;
use Annotation\IAnnotation;
use JetBrains\PhpStorm\Pure;
use ReflectionException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
@@ -23,10 +24,10 @@ use Snowflake\Snowflake;
* @param \HttpServer\IInterface\After|\HttpServer\IInterface\After[] $after
* @throws
*/
public function __construct(public string|array $after)
#[Pure] public function __construct(public string|array $after)
{
if (is_string($this->after)) {
$this->after = [];
$this->after = [$this->after];
}
}
+1 -1
View File
@@ -27,7 +27,7 @@ use Snowflake\Snowflake;
#[Pure] public function __construct(public string|array $interceptor)
{
if (is_string($this->interceptor)) {
$this->interceptor = [];
$this->interceptor = [$this->interceptor];
}
}
+3 -2
View File
@@ -5,6 +5,7 @@ namespace Annotation\Route;
use Annotation\IAnnotation;
use JetBrains\PhpStorm\Pure;
use ReflectionException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
@@ -23,10 +24,10 @@ use Snowflake\Snowflake;
* @param string|array $limits
* @throws
*/
public function __construct(public string|array $limits)
#[Pure] public function __construct(public string|array $limits)
{
if (is_string($this->limits)) {
$this->limits = [];
$this->limits = [$this->limits];
}
}
+2 -2
View File
@@ -25,10 +25,10 @@ use Snowflake\Snowflake;
* @param string|array $middleware
* @throws
*/
public function __construct(public string|array $middleware)
#[Pure] public function __construct(public string|array $middleware)
{
if (is_string($this->middleware)) {
$this->middleware = [];
$this->middleware = [$this->middleware];
}
}