改名
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
namespace Annotation\Route;
|
||||
|
||||
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
/**
|
||||
* Class Limits
|
||||
* @package Annotation\Route
|
||||
@@ -15,9 +17,16 @@ namespace Annotation\Route;
|
||||
/**
|
||||
* Limits constructor.
|
||||
* @param string|array $limits
|
||||
* @throws
|
||||
*/
|
||||
public function __construct(public string|array $limits)
|
||||
{
|
||||
if (is_string($this->limits)) {
|
||||
$this->limits = [$this->limits];
|
||||
}
|
||||
foreach ($this->limits as $key => $item) {
|
||||
$this->limits[$key] = Snowflake::createObject($item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user