prettier / prettier/plugin-php
Case build-in classes
未关闭
还没有人认领这个 Issue。
discussion
enhancement
needs investigation
- 主要语言
- PHP
- 星标
- 1.9k
- 派生
- 139
- PR 合并指标
- 30 天内没有已合并 PR
描述
Ref: http://php.net/manual/en/reserved.classes.php
In php allowed use any case of build-in class:
$exception = new Exception('Message');
$exception = new EXCEPTION('Message');
$exception = new eXcEpTiOn('Message');
Always return exception build-in class.
Should we prettify class names? Also don't forget about namespaces.
- File without namespace -
new Exception()===new \Exception();. - File with namespace -
new Exception!==new \Exception.
In theory we can do it:
- If namespace exists only correct
new \Exception(); - If namespace doesn't exists correct and
new Exception()andnew \Exception();
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查 issue 中的 PHP 示例,以及其中引用的保留类和命名空间规则。完成标准是:就如何处理有命名空间和无命名空间文件中的内置类名,达成一项考虑命名空间的共识决定,随后在相关 formatter 测试中完成实现并补充覆盖。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100