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];
}
}