PHPackages                             bca/laravel-inspect - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bca/laravel-inspect

ActiveLibrary

bca/laravel-inspect
===================

Instant support for PHP Code Sniffer, PHP CS Fixer, and PHP MD in the Artisan CLI

1.3.3(11y ago)5024.1k↓100%7[3 issues](https://github.com/brodkinca/BCA-Laravel-Inspect/issues)MITPHPPHP &gt;=5.3.0

Since Mar 16Pushed 11y ago4 watchersCompare

[ Source](https://github.com/brodkinca/BCA-Laravel-Inspect)[ Packagist](https://packagist.org/packages/bca/laravel-inspect)[ RSS](/packages/bca-laravel-inspect/feed)WikiDiscussions develop Synced today

READMEChangelogDependencies (5)Versions (16)Used By (0)

BCA Inspector Tools for Laravel
===============================

[](#bca-inspector-tools-for-laravel)

[![Build Status](https://camo.githubusercontent.com/4d259f33e06a24a7abaa8ad0f03c363f27ecc4ca108d1870aa33767664d6fc24/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f62726f646b696e63612f4243412d4c61726176656c2d496e73706563742e706e67)](http://travis-ci.org/brodkinca/BCA-Laravel-Inspect)[![Dependencies Status](https://camo.githubusercontent.com/08b845d6ac093df3d96b5825f001e376b63322434dbc394d8443284cb0b1e4c2/68747470733a2f2f646570656e64696e672e696e2f62726f646b696e63612f4243412d4c61726176656c2d496e73706563742e706e67)](http://depending.in/brodkinca/BCA-Laravel-Inspect)[![Coverage Status](https://camo.githubusercontent.com/fec13b9a66b57af837b5f145d35ca4242d1e98ceeeabc8b8178a4f0a60111e2d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f62726f646b696e63612f4243412d4c61726176656c2d496e73706563742f62616467652e706e67)](https://coveralls.io/r/brodkinca/BCA-Laravel-Inspect)

[![Latest Stable Version](https://camo.githubusercontent.com/e36a3f62c7d58971e9fb51105379af8c47fa9402a64efc25a4de09930b722a3f/68747470733a2f2f706f7365722e707567782e6f72672f6263612f6c61726176656c2d696e73706563742f762f737461626c652e706e67)](https://packagist.org/packages/bca/laravel-inspect)[![Total Downloads](https://camo.githubusercontent.com/58ae49fa644faa149435c1afe1dc6f61c3d39a2ade8880baeb28861f0c53db1c/68747470733a2f2f706f7365722e707567782e6f72672f6263612f6c61726176656c2d696e73706563742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/bca/laravel-inspect)[![License](https://camo.githubusercontent.com/7bfc1b729b28093c565335396d7c12654023fa77429c0b6be543a66e1177b5c8/68747470733a2f2f706f7365722e707567782e6f72672f6263612f6c61726176656c2d696e73706563742f6c6963656e73652e706e67)](https://packagist.org/packages/bca/laravel-inspect)

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:

- [PHP Code Sniffer](http://www.squizlabs.com/php-codesniffer)
- [PHP CS Fixer](http://cs.sensiolabs.org/)
- [PHP Mess Detector](http://phpmd.org/)
- PHP's Native Linter

Installation
------------

[](#installation)

### 1. Add the package to Composer

[](#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

[](#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!

[](#3-enjoy)

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

Advanced Usage
--------------

[](#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](http://pear.php.net/manual/en/standards.php), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), or invent one of your own!

### Custom Rulesets

[](#custom-rulesets)

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

#### PHP Code Sniffer

[](#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](http://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php) 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

[](#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](http://phpmd.org/documentation/creating-a-ruleset.html).

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

Contributing
------------

[](#contributing)

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

### Versioning

[](#versioning)

This library will be maintained under the Semantic Versioning guidelines.

Releases will be numbered with the following format:

```
..

```

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 .

### Testing

[](#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!!!

###  Health Score

37

—

LowBetter than 84% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 98.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Recently: every ~25 days

Total

14

Last Release

4266d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a4feb5a2e8a07f71eb19ee7fa194924d7cad91c2bee8a93aed1ce9323881eda0?d=identicon)[brodkinca](/maintainers/brodkinca)

---

Top Contributors

[![brodkin](https://avatars.githubusercontent.com/u/236564?v=4)](https://github.com/brodkin "brodkin (59 commits)")[![freezy-sk](https://avatars.githubusercontent.com/u/661637?v=4)](https://github.com/freezy-sk "freezy-sk (1 commits)")

---

Tags

laravelartisaninspector

### Embed Badge

![Health badge](/badges/bca-laravel-inspect/health.svg)

```
[![Health](https://phpackages.com/badges/bca-laravel-inspect/health.svg)](https://phpackages.com/packages/bca-laravel-inspect)
```

###  Alternatives

[grazulex/laravel-devtoolbox

Swiss-army artisan CLI for Laravel — Scan, inspect, debug, and explore every aspect of your Laravel application from the command line.

1524.8k](/packages/grazulex-laravel-devtoolbox)[socialengine/sniffer-rules

A Lumen 5 and Laravel 5 SquizLabs Code Sniffer 2.0 artisan command. Detect violations of a defined coding standard. It helps your code remains clean and consistent.

1248.2k1](/packages/socialengine-sniffer-rules)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
