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,5 +1,6 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\Http;
@@ -12,7 +13,6 @@ use ZM\Annotation\Interfaces\ErgodicAnnotation;
* Class Controller
* @Annotation
* @Target("CLASS")
* @package ZM\Annotation\Http
*/
class Controller extends AnnotationBase implements ErgodicAnnotation
{

View File

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

View File

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

View File

@@ -1,16 +1,15 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\Http;
use Doctrine\Common\Annotations\Annotation\Target;
use Exception;
use ZM\Annotation\AnnotationBase;
/**
* Class HandleException
* @package ZM\Annotation\Http
* @Annotation
* @Target("METHOD")
*/
@@ -20,4 +19,4 @@ class HandleException extends AnnotationBase
* @var string
*/
public $class_name = Exception::class;
}
}

View File

@@ -1,9 +1,9 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\Http;
use Doctrine\Common\Annotations\Annotation\Required;
use Doctrine\Common\Annotations\Annotation\Target;
use ZM\Annotation\AnnotationBase;
@@ -11,7 +11,6 @@ use ZM\Annotation\Interfaces\ErgodicAnnotation;
/**
* Class Middleware
* @package ZM\Annotation\Http
* @Annotation
* @Target("ALL")
*/

View File

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

View File

@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\Http;
@@ -11,7 +12,6 @@ use ZM\Annotation\AnnotationBase;
* Class RequestMapping
* @Annotation
* @Target("METHOD")
* @package ZM\Annotation\Http
*/
class RequestMapping extends AnnotationBase
{

View File

@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);
namespace ZM\Annotation\Http;
@@ -9,21 +10,26 @@ use ZM\Annotation\AnnotationBase;
/**
* Class RequestMethod
* @Annotation
* @package ZM\Annotation\Http
*/
class RequestMethod extends AnnotationBase
{
public const GET = 'GET';
public const POST = 'POST';
public const PUT = 'PUT';
public const PATCH = 'PATCH';
public const DELETE = 'DELETE';
public const OPTIONS = 'OPTIONS';
public const HEAD = 'HEAD';
/**
* @var string
* @Required()
*/
public $method = self::GET;
public const GET = 'GET';
public const POST = 'POST';
public const PUT = 'PUT';
public const PATCH = 'PATCH';
public const DELETE = 'DELETE';
public const OPTIONS = 'OPTIONS';
public const HEAD = 'HEAD';
}