tzachi/coding-standard
Composer 安装命令:
composer require tzachi/coding-standard
包简介
Coding Standard for TZachi's projects
README 文档
README
This project has a set of PHP_CodeSniffer rules that are based on doctrine/coding-standard rules, but with some small changes and additions.
Differences from doctrine coding-standards
- Inline comments should begin with a space, for example:
// This is an inline comment - Docblock annotation groups are grouped a bit different
- Empty catch in try...catch must have a comment explaining why the exception is not handled
- There shouldn't be a space after the negation operator
if (!$cond) - No space before colon in return type:
public function test(): void - Property doc comments shouldn't be a single line, but multiline instead:
/** * @var int */
- Variable/property/function names should be camelCased:
$camelCaseVariable - A @throw tag comment doesn't need to end in full stop:
class Abc { /** * @throw InvalidArgumentException This is a comment that doesn't end in a full stop */ public function def(): void { ... }
统计信息
- 总下载量: 238
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-17