mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-12 11:15:34 +08:00
add cs fixer and PHPStan and activate it (build 436)
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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")
|
||||
*/
|
||||
|
||||
@@ -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")
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
*/
|
||||
|
||||
@@ -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")
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user