mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 07:35:34 +08:00
PHP80 小修 (#187)
* migrate-php80 fix styles fix static analyse * fix some bugs
This commit is contained in:
@@ -23,20 +23,16 @@ use ZM\Annotation\Interfaces\Level;
|
||||
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_METHOD)]
|
||||
class BindEvent extends AnnotationBase implements Level
|
||||
{
|
||||
/**
|
||||
* @Required()
|
||||
*/
|
||||
public string $event_class;
|
||||
|
||||
public int $level = 800;
|
||||
|
||||
/**
|
||||
* @param string $event_class 绑定事件的类型
|
||||
*/
|
||||
public function __construct(string $event_class, int $level = 800)
|
||||
{
|
||||
$this->event_class = $event_class;
|
||||
$this->level = $level;
|
||||
public function __construct(
|
||||
/**
|
||||
* @Required()
|
||||
*/
|
||||
public string $event_class,
|
||||
public int $level = 800
|
||||
) {
|
||||
}
|
||||
|
||||
public function getLevel(): int
|
||||
|
||||
@@ -19,10 +19,7 @@ use ZM\Annotation\AnnotationBase;
|
||||
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_METHOD)]
|
||||
class Init extends AnnotationBase
|
||||
{
|
||||
public int $worker = 0;
|
||||
|
||||
public function __construct(int $worker = 0)
|
||||
public function __construct(public int $worker = 0)
|
||||
{
|
||||
$this->worker = $worker;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user