use Psr\Container\ContainerInterface;
use ReflectionClass;
use ReflectionException;
-use ReflectionNamedType;
use ReflectionFunction;
use ReflectionFunctionAbstract;
use ReflectionMethod;
+use ReflectionNamedType;
use think\exception\ClassNotFoundException;
use think\exception\FuncNotFoundException;
use think\helper\Str;
无需参数的类补充上括号
- static::$instance = new static;
+ static::$instance = new static();
使用单引号
- if ($this->server('HTTP_VIA') && stristr($this->server('HTTP_VIA'), "wap")) {
+ if ($this->server('HTTP_VIA') && stristr($this->server('HTTP_VIA'), 'wap')) {
更改后效果预览 https://github.styleci.io/analyses/LZJaJn
一、禁用规则
phpdoc_summary
该规则要求注释结尾加句号,目前可考虑禁用。
phpdoc_separation
该规则要求不同注释类型要用空行分开,目前可考虑禁用
blank_line_after_opening_tag
该规则要求
<?php
后面需要一行空行,目前可考虑禁用concat_without_spaces
该规则要求变量与字符串连接是,
.
前后不能有空格,目前可考虑禁用二、剩余不符合规范的代码示例
integer
统一为int
,类型、变量名和描述对齐删除
@access
@package
等号两边只保留一个空格
导入顺序调整
无需参数的类补充上括号
使用单引号