add cs fixer and PHPStan and activate it (build 436)

This commit is contained in:
crazywhalecc
2022-03-15 18:05:33 +08:00
parent d01bd69aa5
commit 1706afbcd0
163 changed files with 4572 additions and 3588 deletions

View File

@@ -1,16 +1,15 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\CQ;
use Doctrine\Common\Annotations\Annotation\Required;
use Doctrine\Common\Annotations\Annotation\Target;
use ZM\Annotation\AnnotationBase;
/**
* Class CQAPIResponse
* @package ZM\Annotation\CQ
* @Annotation
* @Target("METHOD")
*/

View File

@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\CQ;
@@ -11,7 +12,6 @@ use ZM\Annotation\Interfaces\Level;
* Class CQAfter
* @Annotation
* @Target("METHOD")
* @package ZM\Annotation\CQ
*/
class CQAfter extends AnnotationBase implements Level
{
@@ -26,14 +26,16 @@ class CQAfter extends AnnotationBase implements Level
/**
* @return mixed
*/
public function getLevel() {
public function getLevel()
{
return $this->level;
}
/**
* @param mixed $level
*/
public function setLevel($level) {
public function setLevel($level)
{
$this->level = $level;
}
}

View File

@@ -1,9 +1,9 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\CQ;
use Doctrine\Common\Annotations\Annotation\Required;
use Doctrine\Common\Annotations\Annotation\Target;
use ZM\Annotation\AnnotationBase;
@@ -13,7 +13,6 @@ use ZM\Annotation\Interfaces\Level;
* Class CQBefore
* @Annotation
* @Target("METHOD")
* @package ZM\Annotation\CQ
*/
class CQBefore extends AnnotationBase implements Level
{
@@ -28,15 +27,16 @@ class CQBefore extends AnnotationBase implements Level
/**
* @return mixed
*/
public function getLevel(): int {
public function getLevel(): int
{
return $this->level;
}
/**
* @param mixed $level
*/
public function setLevel($level) {
public function setLevel($level)
{
$this->level = $level;
}
}
}

View File

@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\CQ;
@@ -11,43 +12,55 @@ use ZM\Annotation\Interfaces\Level;
* Class CQCommand
* @Annotation
* @Target("ALL")
* @package ZM\Annotation\CQ
*/
class CQCommand extends AnnotationBase implements Level
{
/** @var string */
public $match = "";
public $match = '';
/** @var string */
public $pattern = "";
public $pattern = '';
/** @var string */
public $regex = "";
public $regex = '';
/** @var string */
public $start_with = "";
public $start_with = '';
/** @var string */
public $end_with = "";
public $end_with = '';
/** @var string */
public $keyword = "";
public $keyword = '';
/** @var string[] */
public $alias = [];
/** @var string */
public $message_type = "";
public $message_type = '';
/** @var int */
public $user_id = 0;
/** @var int */
public $group_id = 0;
/** @var int */
public $discuss_id = 0;
/** @var int */
public $level = 20;
/**
* @return int
*/
public function getLevel(): int { return $this->level; }
public function getLevel(): int
{
return $this->level;
}
/**
* @param int $level
*/
public function setLevel($level) { $this->level = $level; }
public function setLevel($level)
{
$this->level = $level;
}
}

View File

@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\CQ;
@@ -11,30 +12,39 @@ use ZM\Annotation\Interfaces\Level;
* Class CQMessage
* @Annotation
* @Target("ALL")
* @package ZM\Annotation\CQ
*/
class CQMessage extends AnnotationBase implements Level
{
/**
* @var string
*/
public $message_type = "";
public $message_type = '';
/** @var int */
public $user_id = 0;
/** @var int */
public $group_id = 0;
/** @var int */
public $discuss_id = 0;
/** @var string */
public $message = "";
public $message = '';
/** @var string */
public $raw_message = "";
public $raw_message = '';
/** @var int */
public $level = 20;
public function getLevel(): int { return $this->level; }
public function getLevel(): int
{
return $this->level;
}
public function setLevel($level) {
public function setLevel($level)
{
$this->level = $level;
}
}
}

View File

@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\CQ;
@@ -12,7 +13,6 @@ use ZM\Annotation\Interfaces\Level;
* Class CQMetaEvent
* @Annotation
* @Target("ALL")
* @package ZM\Annotation\CQ
*/
class CQMetaEvent extends AnnotationBase implements Level
{
@@ -21,18 +21,23 @@ class CQMetaEvent extends AnnotationBase implements Level
* @Required()
*/
public $meta_event_type = '';
/** @var int */
public $level;
/**
* @return mixed
*/
public function getLevel(): int { return $this->level; }
public function getLevel(): int
{
return $this->level;
}
/**
* @param int $level
*/
public function setLevel($level) {
public function setLevel($level)
{
$this->level = $level;
}
}
}

View File

@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\CQ;
@@ -11,32 +12,34 @@ use ZM\Annotation\Interfaces\Level;
* Class CQNotice
* @Annotation
* @Target("ALL")
* @package ZM\Annotation\CQ
*/
class CQNotice extends AnnotationBase implements Level
{
/** @var string */
public $notice_type = "";
public $notice_type = '';
/** @var string */
public $sub_type = "";
public $sub_type = '';
/** @var int */
public $group_id = 0;
/** @var int */
public $operator_id = 0;
/** @var int */
public $level = 20;
/**
* @return int
*/
public function getLevel(): int {
public function getLevel(): int
{
return $this->level;
}
/**
* @param int $level
*/
public function setLevel($level) {
public function setLevel($level)
{
$this->level = $level;
}
}
}

View File

@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\CQ;
@@ -11,32 +12,34 @@ use ZM\Annotation\Interfaces\Level;
* Class CQRequest
* @Annotation
* @Target("ALL")
* @package ZM\Annotation\CQ
*/
class CQRequest extends AnnotationBase implements Level
{
/** @var string */
public $request_type = "";
public $request_type = '';
/** @var string */
public $sub_type = "";
public $sub_type = '';
/** @var int */
public $user_id = 0;
/** @var string */
public $comment = "";
public $comment = '';
/** @var int */
public $level = 20;
/**
* @return int
*/
public function getLevel(): int {
public function getLevel(): int
{
return $this->level;
}
/**
* @param int $level
*/
public function setLevel($level) {
public function setLevel($level)
{
$this->level = $level;
}
}
}