承接 lemberg/laravel-code-style-command 相关项目开发

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

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

lemberg/laravel-code-style-command

Composer 安装命令:

composer require lemberg/laravel-code-style-command

包简介

Check code style.

README 文档

README

This package adds simple artisan command over PHP_CodeSniffer script. Validate PSR2 coding standard in you application.

Requirements

  • PHP >= 7.0
  • Laravel = 5.5.*|5.8.*

Getting Started

Add the package in your composer.json

$ composer require --dev lemberg/laravel-code-style-command

So that's all :)

Check you code style in app/ directory.

$ php artisan code-style

Example output:

FILE: .../bkhrupa/work/lemberg/laravel-code-style-command/app/User.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 8 | ERROR | [x] Opening brace of a class must be on the line after
   |       |     the definition
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 116ms; Memory: 6Mb

Finished

Advance usage

$ php artisan code-style --help

Config file

Publish code-style.php config file.

$ php artisan vendor:publish --provider="Lemberg\LaravelCsc\LaravelCscServiceProvider"

Git pre-commit hook

Use git pre-commit hook

Add next code to pre commit hooks file .git/hooks/pre-commit.

#!/bin/bash

`php ./artisan code-style --print-command`

pre-commit hook must be executable

$ chmod +x .git/hooks/pre-commit

License

Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固