You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php
+
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
interface SessionHandlerInterface
{
public function read(string $sessionId): string;
+
public function delete(string $sessionId): bool;
+
public function write(string $sessionId, string $data): bool;
}
因现在仓库每次的提交的 StyleCi 检查都不通过,且 StyleCi 的默认规则又不符合我们的需求,因此花了些时间整理出了 StyleCi 默认配置的影响。
一、配置文件
目前计划增加该配置文件
二、问题配置项概览
以下为 styleci 推荐配置产生的影响范围概览,列举了推荐配置中,每项配置影响的文件数和行数。禁用列为
Y
的,表示个人认为影响范围较大,可不使用该配置。禁用列为?
的,个人拿不定主意,不确定要不要使用。二、问题详情
align_double_arrow
更改:5 个文件,增加 32 行,删除 32 行
alpha_ordered_imports
更改:3 个文件,增加 3 行,删除 3 行
binary_operator_exactly_one_space
更改:79 个文件,增加 864 行,删除 864 行
blank_line_after_opening_tag
更改:148 个文件,增加 148 行,删除 0 行
<?php + // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +----------------------------------------------------------------------
blank_line_before_return
更改:44 个文件,增加 128 行,删除 0 行
public function name(string $name) { $this->name = $name; + return $this; }
blank_line_before_throw
更改:8 个文件,增加 8 行,删除 0 行
$msg = Lang::get($fileUploadErrors[$error]); + throw new Exception($msg, $error);
blank_line_before_try
更改:1 个文件,增加 1 行,删除 0 行
if (is_callable([$instance, $action])) { $vars = $this->request->param(); + try { $reflect = new ReflectionMethod($instance, $action); // 严格获取当前操作方法名
concat_without_spaces
更改:76 个文件,增加 351 行,删除 351 行
declare_equal_normalize
更改:28 个文件,增加 28 行,删除 28 行
heredoc_to_nowdoc
更改:2 个文件,增加 2 行,删除 2 行
method_separation
更改:27 个文件,增加 2 行,删除 28 行
{ return 'app' . ($app ? '\\' . $app : ''); } - }
new_with_parentheses
更改:8 个文件,增加 13 行,删除 13 行
no_blank_lines_after_class_opening
更改:26 个文件,增加 0 行,删除 26 行
class File extends SplFileInfo { - /** * 文件hash规则 * @var array
no_unneeded_control_parentheses
更改:1 个文件,增加 1 行,删除 1 行
no_unused_lambda_imports
更改:1 个文件,增加 1 行,删除 1 行
no_useless_return
更改:2 个文件,增加 2 行,删除 2 行
no_whitespace_in_blank_line
更改:2 个文件,增加 2 行,删除 2 行
phpdoc_align
更改:100 个文件,增加 1510 行,删除 1510 行
phpdoc_no_access
更改:87 个文件,增加 0 行,删除 756 行
/** * 架构方法 - * @access public * @param string $rootPath 应用根目录 */ public function __construct(string $rootPath = '')
phpdoc_no_package
更改:36 个文件,增加 0 行,删除 36 行
/** * 配置管理类 - * @package think */ class Config {
phpdoc_no_useless_inheritdoc
更改:2 个文件,增加 3 行,删除 3 行
phpdoc_order
更改:18 个文件,增加 32 行,删除 32 行
phpdoc_scalar
更改:16 个文件,增加 28 行,删除 28 行
phpdoc_separation
更改:112 个文件,增加 2824 行,删除 1 行
phpdoc_single_line_var_spacing
更改:3 个文件,增加 9 行,删除 9 行
phpdoc_summary
更改:122 个文件,增加 1157 行,删除 1157 行
phpdoc_trim
更改:1 个文件,增加 0 行,删除 1 行
* * @param string $name * @return mixed - * */ protected function createDriver(string $name) {
phpdoc_types
更改:4 个文件,增加 5 行,删除 5 行
post_increment
更改:4 个文件,增加 5 行,删除 5 行
return_type_declaration
更改:1 个文件,增加 2 行,删除 2 行
single_blank_line_before_namespace
更改:13 个文件,增加 13 行,删除 0 行
// +---------------------------------------------------------------------- // | Author: liu21st <liu21st@gmail.com> // +---------------------------------------------------------------------- + namespace think;
single_quote
更改:31 个文件,增加 86 行,删除 86 行
symfony_braces
更改:65 个文件,增加 28 行,删除 96 行
public function bar() { - }
unalign_equals
更改:73 个文件,增加 344 行,删除 344 行
union_type_without_spaces
更改:3 个文件,增加 6 行,删除 6 行
The text was updated successfully, but these errors were encountered: