mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 15:45:36 +08:00
add PHP8 Attribute compatibility (build 439, 2.7.0-beta4)
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace ZM\Annotation\Swoole;
|
||||
|
||||
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
|
||||
use Doctrine\Common\Annotations\Annotation\Required;
|
||||
use Doctrine\Common\Annotations\Annotation\Target;
|
||||
use ZM\Annotation\AnnotationBase;
|
||||
@@ -11,6 +12,7 @@ use ZM\Annotation\AnnotationBase;
|
||||
/**
|
||||
* Class OnTick
|
||||
* @Annotation
|
||||
* @NamedArgumentConstructor()
|
||||
* @Target("METHOD")
|
||||
* @since 1.2
|
||||
*/
|
||||
@@ -26,4 +28,10 @@ class OnTick extends AnnotationBase
|
||||
* @var int
|
||||
*/
|
||||
public $worker_id = 0;
|
||||
|
||||
public function __construct($tick_ms, $worker_id = 0)
|
||||
{
|
||||
$this->tick_ms = $tick_ms;
|
||||
$this->worker_id = $worker_id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user