This commit is contained in:
2021-02-23 14:45:50 +08:00
parent e789002c9e
commit 27f6c88cbf
6 changed files with 24 additions and 35 deletions
+5
View File
@@ -17,6 +17,8 @@ use Snowflake\Snowflake;
#[\Attribute(\Attribute::TARGET_METHOD)] class Middleware implements IAnnotation
{
use Node;
/**
* Interceptor constructor.
@@ -25,6 +27,9 @@ use Snowflake\Snowflake;
*/
public function __construct(public string|array $middleware)
{
if (is_string($this->middleware)) {
$this->middleware = [];
}
}