没有合适的资源?快使用搜索试试~ 我知道了~
phpstan-strict-rules:PHPStan的特别严格和自以为是的规则
共53个文件
php:36个
yml:4个
neon:3个
需积分: 33 0 下载量 97 浏览量
2021-05-12
23:14:07
上传
评论
收藏 41KB ZIP 举报
温馨提示
PHPStan的特别严格和自以为是的规则 专注于查找代码中的错误。 但是在PHP中,如何编写东西还有很多余地。 该存储库包含一些附加规则,这些规则围绕严格和强类型的代码展开,对于在极具防御性的编程中需要额外安全性的用户而言,这些规则不存在任何松散转换: 在if , elseif ,三元运算符之后,需要布尔值! ,以及&&和||两侧。 在+需要数字操作数或数组,在- / * / / / ** / %需要数字操作数。 需要在数字操作数$var++ , $var-- , ++$var和--$var 。 这些函数包含一个$strict参数,以提高类型安全性,必须将其设置为true : in_array (第3个参数) array_search (第3个参数) array_keys (第三个参数;仅在提供第二个参数$search_value情况下) base64_decode (第
资源推荐
资源详情
资源评论
收起资源包目录
phpstan-strict-rules-master.zip (53个子文件)
phpstan-strict-rules-master
.gitignore 23B
phpstan.neon 716B
README.md 4KB
.github
workflows
lock-closed-issues.yml 652B
release.yml 764B
build.yml 4KB
dependabot.yml 400B
phpcs.xml 3KB
LICENSE 1KB
composer.json 786B
.gitattributes 21B
src
Rules
Operators
OperandInArithmeticPostDecrementRule.php 344B
OperandInArithmeticPostIncrementRule.php 344B
OperandsInArithmeticDivisionRule.php 1KB
OperandInArithmeticIncrementOrDecrementRule.php 1KB
OperatorRuleHelper.php 2KB
OperandsInArithmeticSubtractionRule.php 1KB
OperandsInArithmeticAdditionRule.php 1KB
OperandsInArithmeticModuloRule.php 1KB
OperandsInArithmeticMultiplicationRule.php 1KB
OperandInArithmeticPreDecrementRule.php 341B
OperandInArithmeticPreIncrementRule.php 341B
OperandsInArithmeticExponentiationRule.php 1KB
ForeachLoop
OverwriteVariablesWithForeachRule.php 2KB
DisallowedConstructs
DisallowedBacktickRule.php 558B
DisallowedImplicitArrayCreationRule.php 1KB
DisallowedShortTernaryRule.php 614B
DisallowedEmptyRule.php 554B
ForLoop
OverwriteVariablesWithForLoopInitRule.php 1KB
VariableVariables
VariableVariablesRule.php 580B
VariableStaticMethodCallRule.php 883B
VariablePropertyFetchRule.php 2KB
VariableMethodCallRule.php 715B
VariableStaticPropertyFetchRule.php 920B
StrictCalls
StrictFunctionCallsRule.php 2KB
DynamicCallOnStaticMethodsRule.php 1KB
Methods
WrongCaseOfInheritedMethodRule.php 2KB
SwitchConditions
MatchingTypeInSwitchCaseConditionRule.php 1KB
Cast
UselessCastRule.php 2KB
BooleansInConditions
BooleanInBooleanAndRule.php 2KB
BooleanInElseIfConditionRule.php 950B
BooleanInBooleanOrRule.php 2KB
BooleanRuleHelper.php 994B
BooleanInBooleanNotRule.php 931B
BooleanInIfConditionRule.php 934B
BooleanInTernaryOperatorRule.php 1018B
Classes
RequireParentConstructCallRule.php 4KB
build-cs
.gitignore 23B
composer.json 166B
rules.neon 3KB
.editorconfig 355B
phpstan-baseline.neon 34KB
build.xml 2KB
共 53 条
- 1
资源评论
粢范团
- 粉丝: 31
- 资源: 4697
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功