承接 empty-monkey/code-style 相关项目开发

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

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

empty-monkey/code-style

Composer 安装命令:

composer require empty-monkey/code-style

包简介

Code Style settings for Empty Monkey's repositories

README 文档

README

This package install PHP-CS-Fixer with styling fitted for Empty Monkey.

Installation

1. Install package

composer require --dev empty-monkey/code-style

2. Create config file

Create file .php-cs-fixer.dist.php to your project's root directory and copy the content from here:

<?php

require_once __DIR__ . '/vendor/autoload.php';

$finder = PhpCsFixer\Finder::create()
    ->in(__DIR__)
    ->ignoreDotFiles(false)
    ->name('.php-cs-fixer.dist.php')
    ->exclude([
        'vendor',
        'bootstrap/cache',
        'storage',
    ])
;

$ruleSet = new \EmptyMonkey\CodeStyle\PhpCsFixer\RuleSet\EmptyMonkeySet();
$config  = new \EmptyMonkey\CodeStyle\PhpCsFixer\Config();

$config
    ->setRules($ruleSet->getRules())
    ->setFinder($finder)
;

return $config;

Note: Excluding bootstrap/cache and storage are very Laravel specific excludes. Empty Monkey uses Laravel a lot, but feel free to remove those lines if they don't suit your needs.

3. Make it easy to run

Add support for your composer to run styling by adding this to your composer.json. Now you can run the styles to all your files by running composer style.

    "scripts": {
        "style": [
            "php vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --using-cache=no --config=.php-cs-fixer.dist.php -v"
        ]
    }

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-10-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固