承接 fomiash/psr40000 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fomiash/psr40000

Composer 安装命令:

composer require fomiash/psr40000

包简介

PSR 40.000 — galactic coding standard for PHP

关键字:

README 文档

README

PHP License: MIT

«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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-18