realodix/relax 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

realodix/relax

Composer 安装命令:

composer require realodix/relax

包简介

Shared php-cs-fixer rules & finders preset

README 文档

README

PHPVersion Packagist Version (custom server) Build Status

Relax is built on top of PHP-CS-Fixer and makes it easy to provide a standardized way to apply coding standards across multiple projects, ensuring consistency and adherence to best practices.

By using predefined rulesets, it simplifies the setup process and allows teams to quickly integrate PHP-CS-Fixer into their development workflow.

Installation

You can install this package by using composer:

composer require --dev realodix/relax

Running

./vendor/bin/php-cs-fixer fix

Configuration

use Realodix\Relax\Config;

return Config::this()
    ->setRules([
        '@Realodix/Laravel' => true,
    ]);

or using the original PHP-CS-Fixer way

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$finder = (new Finder)->in(__DIR__);

return (new Config)
    ->registerCustomRuleSets([
        new \Realodix\Relax\Rulesets\Laravel,
    ])
    ->setRules([
        '@Realodix/Laravel' => true,
    ])
    ->setFinder($finder)
;

# Rule Sets

  • @Realodix/Laravel - Realodix\Relax\Rulesets\Laravel

    Rules that follow the official Laravel coding standards.

  • @Realodix/Relax - Realodix\Relax\Rulesets\Relax

    Laravel based with a few tweaks.

# Finder Sets

By default, Relax will inspect all .php files in your project except those in the vendor directory.

Method Description
Finder::base() The basic finder setup should be perfect for most PHP projects
Finder::laravel() Inherits Finder::base() with some specific tweaks to Laravel

💡 By default, if finder is not set Relax will use Finder::base().

Troubleshooting

For general help and support join our GitHub Discussions.

Please report bugs to the GitHub Issue Tracker.

License

This package is licensed under the MIT License.

统计信息

  • 总下载量: 57.07k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 14
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固