Giter Club home page Giter Club logo

bca-laravel-inspect's Introduction

BCA Inspector Tools for Laravel

Build Status Dependencies Status Coverage Status

Latest Stable Version Total Downloads License

Inspect your code via the Artisan CLI using industry-standard tools.

This Laravel 4 package adds several pre-configured tools to the Artisan CLI, speeding up your development process and making your code cleaner.

The tools currently provided are:

Installation

1. Add the package to Composer

This package should be installed via Composer. You may either edit your project's composer.json file to require bca/laravel-inspect or via the command line.

composer require bca/laravel-inspect:~1.3

2. Add the service provider

Once the package has been successfully installed, the final step is to add the service provider. Open app/config/app.php, and add a new item to the providers array:

'BCA\LaravelInspect\LaravelInspectServiceProvider'

3. Enjoy!

That's all, folks! Just type ./artisan from the root directory of your Laravel installation to see your new tools!

Advanced Usage

We've crafted rules for the tools that we've provided that match the coding style of the Laravel project itself. That said, one size doesn't fit all, and there is no reason why you can't use the PEAR style guide, PSR-2, or invent one of your own!

Custom Rulesets

Both PHP Code Sniffer and PHP Mess Detector support the creation of custom rulesets.

PHP Code Sniffer

To create a custom ruleset for use with the inspect:sniff command just drop a ruleset named phpcs.xml in Laravel's app directory. You may then use this annotated ruleset as a guide in creating your own.

You may also run php artisan inspect:sniff --install-ruleset to copy our rules to your project so that you can modify them.

PHP Mess Detector

To create a custom ruleset for use with the inspect:mess command just drop a ruleset named phpmd.xml in Laravel's app directory. The PHPMD website offers instructions on how to create a ruleset.

You may also run php artisan inspect:mess --install-ruleset to copy our rules to your project so that you can modify them.

Contributing

This project will be maintained on Github at https://github.com/brodkinca/BCA-Laravel-Inspect. You will also find this project's Issue Tracker there.

Versioning

This library will be maintained under the Semantic Versioning guidelines.

Releases will be numbered with the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major (and resets the minor and patch)
  • New additions without breaking backward compatibility bumps the minor (and resets the patch)
  • Bug fixes and misc changes bump the patch

For more information on SemVer, please visit http://semver.org/.

Testing

Due to the peculiarities of the Artisan CLI it is not possible to run the unit tests outside of the context of a full Laravel application. Instead, this package should be installed within a copy of Laravel, as a workbench application, and then added to that installation's phpunit.xml file. For this reason it is recommended that you run a development copy of Laravel for package development.

Please run all unit tests before submitting any code!

NOTE: Running the unit tests will erase any phpcs/phpmd configuration files in your app directory without warning!!!

bca-laravel-inspect's People

Contributors

brodkin avatar freezy-sk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.