fomiash/psr40000
Composer 安装命令:
composer require fomiash/psr40000
包简介
PSR 40.000 — galactic coding standard for PHP
README 文档
README
«A long time ago, in a galaxy far, far away…»
Programming standards have become so detailed that that they began to touch on almost all the nuances of naming and composing code. One of these was PSR 40.000, the last bastion of the Imperium, describing the interface for army FOBAR standard. After all, even arbitrary objects described in examples must have a statutory specification.
The use of these standards is indicated in the following cases:
🚫 Wrong:
<?php class Foo { // ... // } class Bar { // ... // } class Baz { // ... // }
🎖️ Right:
<?php use Fomiash\Psr40000\{FooInterface, BarInterface, BazInterface}; class Foo implements FooInterface { // ... // } class Bar implements BarInterface { // ... // } class Baz implements BazInterface { // ... // }
🚫 Wrong:
<?php class Bar { // ... // } class Foo { // ... // } class Baz { public function __construct(public Bar $bar, public Foo $foo) {} }
🎖️ Right:
<?php use Fomiash\Psr40000\{FooInterface, BarInterface, BazInterface}; class Foo implements FooInterface { public function __construct( public BarInterface $bar, public BazInterface $baz) {} } class Bar implements BarInterface { // ... // } class Baz implements BazInterface { // ... // }
Install using Guards Composer:
composer require fomiash/psr40000
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-18