承接 portavice/laravel-pint-config 相关项目开发

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

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

portavice/laravel-pint-config

最新稳定版本:v3.0.0

Composer 安装命令:

composer require portavice/laravel-pint-config

包简介

Laravel Pint configuration used at portavice

README 文档

README

MIT Licensed Latest version on Packagist Total downloads

This project contains the default configuration for Laravel Pint used at portavice GmbH.

The ruleset is based on PSR12 with additional rules for

  • ordered class elements, imports, used interfaces and traits, parameter types, attributes,
  • short syntax, proper indentation, trailing commas, square index braces for arrays,
  • consistent imports, braces, operators, spacing, blank lines, formatting of PHPDoc and other comments,
  • preferring single quotes,
  • combining consecutive issets or unsets,
  • enforcing PSR autoloading and global imports,
  • enforcing PHPUnit standards (camel case for methods, data providers after the test using it, use attributes/code instead of PHPDoc when possible),
  • and avoiding useless code (else, return, sprintf, empty statements).

Contents

Installation

First, install the package via Composer:

composer require portavice/laravel-pint-config --dev

Note that this automatically installs Laravel Pint as well.

Usage

To simplify usage, you may configure the following scripts in your composer.json:

{
    "scripts": {
        "csPHP": "pint --config vendor/portavice/laravel-pint-config/pint.json --test",
        "csfixPHP": "pint --config vendor/portavice/laravel-pint-config/pint.json"
    }
}

Just run composer csPHP to check and composer csfixPHP to fix the PHP files in your Laravel project. Otherwise, you will have to call the pint command with the --config option.

To use and adjust the set of rules defined by this package, you can also copy the pint.json from this repository into your project.

统计信息

  • 总下载量: 20.33k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 9
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-07