承接 achttienvijftien/building-techniques 相关项目开发

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

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

achttienvijftien/building-techniques

最新稳定版本:1.1.0

Composer 安装命令:

composer require achttienvijftien/building-techniques

包简介

Building techniques for WordPress

README 文档

README

This package contains the building techniques (=code style) used in WordPress projects.

About

This package provides a ruleset for PHP_CodeSniffer that extends the ruleset for Timber, which is composed of the WordPress coding standard with some added exceptions. The deviations from the WordPress coding standard are:

  • Class filenames should adhere to PSR-4.
  • Classnames should use StudlyCaps.
  • Lines should be 100 chars long maximum (triggers warning),
  • Lines should in no case exceed 120 characters (triggers error).
  • Allow / as word delimiter in hook names.
  • Allow short array syntax ([]).

Prerequisites

Install Composer to add this package to your project.

Installing

Install the package using composer:

composer require --dev achttienvijftien/building-techniques

After the installation, the phpcs and phpcbf scripts are available in the vendor/bin folder.

We recommend also installing phpcodesniffer-composer-installer to automatically register the coding standard with PHP_CodeSniffer:

composer require --dev dealerdirect/phpcodesniffer-composer-installer

Now, the coding standard should be available for use when running phpcs. You can check the installed coding standards by running:

./vendor/bin/phpcs -i

The list should contain 1815BuildingTechniques.

Usage

To run PHP_CodeSniffer with the appropriate coding standard:

./vendor/bin/phpcs --standard=1815BuildingTechniques path/to/file-or-directory

To fix code style violations that can be corrected automatically:

./vendor/bin/phpcbf --standard=1815BuildingTechniques path/to/file-or-directory

Adding composer scripts

Composer scripts for phpcs and phpcbf can be added to composer.json for convenience.

{
    "scripts": {
        "format": "phpcbf --standard=1815BuildingTechniques --report-summary --report-source",
        "lint": "phpcs --standard=1815BuildingTechniques"
    }
}

IDE Support

Please refer to the Wiki for guides on integrating PHP_Codesniffer with IDEs like PhpStorm.

统计信息

  • 总下载量: 2.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 13
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2022-11-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固