mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 23:55:35 +08:00
add cs fixer and PHPStan and activate it (build 436)
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Entity;
|
||||
|
||||
|
||||
class CQObject
|
||||
{
|
||||
public $type;
|
||||
|
||||
public $params;
|
||||
|
||||
public $start;
|
||||
|
||||
public $end;
|
||||
|
||||
public function __construct($type = "", $params = [], $start = 0, $end = 0) {
|
||||
if ($type !== "") {
|
||||
public function __construct($type = '', $params = [], $start = 0, $end = 0)
|
||||
{
|
||||
if ($type !== '') {
|
||||
$this->type = $type;
|
||||
$this->params = $params;
|
||||
$this->start = $start;
|
||||
@@ -20,7 +24,8 @@ class CQObject
|
||||
}
|
||||
}
|
||||
|
||||
public static function fromArray($arr): CQObject {
|
||||
return new CQObject($arr["type"], $arr["params"] ?? [], $arr["start"], $arr["end"]);
|
||||
public static function fromArray($arr): CQObject
|
||||
{
|
||||
return new CQObject($arr['type'], $arr['params'] ?? [], $arr['start'], $arr['end']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Entity;
|
||||
|
||||
|
||||
use ZM\Annotation\CQ\CQCommand;
|
||||
|
||||
class MatchResult
|
||||
{
|
||||
/** @var bool */
|
||||
public $status = false;
|
||||
/** @var CQCommand|null */
|
||||
public $object = null;
|
||||
|
||||
/** @var null|CQCommand */
|
||||
public $object;
|
||||
|
||||
/** @var array */
|
||||
public $match = [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user