承接 vladyslavstartsev/laravel-strict-coding-standard 相关项目开发

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

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

vladyslavstartsev/laravel-strict-coding-standard

Composer 安装命令:

composer require vladyslavstartsev/laravel-strict-coding-standard

包简介

PHP_CodeSniffer rules for Laravel to force the "right" design of the app

README 文档

README

PHP_CodeSniffer coding standards for Laravel, do force developers not to use bad design decisions that are supported by Laravel

Installing

composer require --dev vladyslavstartsev/laravel-strict-coding-standard

Sniffs included in this standard

LaravelStrictCodingStandard.Laravel.DisallowUseOfGlobalFunctions

  • checks for functions that are declared in

    • vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
    • vendor/laravel/framework/src/Illuminate/Support/helpers.php

LaravelStrictCodingStandard.Laravel.DisallowUseOfFacades

  • checks for usage of Laravel Facades (including Real-time facades)
  • if not configured it will use default path for Illuminate\Foundation\Application instance at bootstrap/app.php

so for default Illuminate\Foundation\Application instance use

<rule ref="LaravelStrictCodingStandard.Laravel.DisallowUseOfFacades"/>

to override, do this

<rule ref="LaravelStrictCodingStandard.Laravel.DisallowUseOfFacades">
    <properties>
        <property name="laravelApplicationInstancePath" type="string" value=".nonDefaultFolder/application.php"/>
    </properties>
</rule>

we need this instance, so we can get all Facades and Aliases that are potentially used in the app ( yes, this looks like dynamic code analysis, but that's the only way how to find out all Facades, if you have ideas how to do it statically, feel free to make PR)

统计信息

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

GitHub 信息

  • Stars: 46
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固