<commit_before># BCA Inspector Tools for Laravel

[![Build Status](https://secure.travis-ci.org/brodkinca/BCA-Laravel-Inspect.png)](http://travis-ci.org/brodkinca/BCA-Laravel-Inspect)
[![Dependencies Status](https://depending.in/brodkinca/BCA-Laravel-Inspect.png)](http://depending.in/brodkinca/BCA-Laravel-Inspect)
[![Coverage Status](https://coveralls.io/repos/brodkinca/BCA-Laravel-Inspect/badge.png)](https://coveralls.io/r/brodkinca/BCA-Laravel-Inspect)

[![Latest Stable Version](https://poser.pugx.org/bca/laravel-inspect/v/stable.png)](https://packagist.org/packages/bca/laravel-inspect) 
[![Total Downloads](https://poser.pugx.org/bca/laravel-inspect/downloads.png)](https://packagist.org/packages/bca/laravel-inspect) 
[![License](https://poser.pugx.org/bca/laravel-inspect/license.png)](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

### 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.

#### Option 1: Edit composer.json manually

First, add `bca/laravel-inspect` to the `require-dev` section.

```json
{ 
    "require-dev": {
        "bca/laravel-inspect": "@stable"
    }
}
```

Next, update Composer from the Terminal:

```sh
composer update
```

#### Option 2: Install via the command line

```sh
composer require --dev bca/laravel-inspect:dev-master
```

### 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 `php artisan` from the root directory of your Laravel installation to see your new tools!

## Advanced Usage
<commit_msg>Fix bug in which an error would be triggered when in a production environment.<commit_after># BCA Inspector Tools for Laravel

[![Build Status](https://secure.travis-ci.org/brodkinca/BCA-Laravel-Inspect.png)](http://travis-ci.org/brodkinca/BCA-Laravel-Inspect)
[![Dependencies Status](https://depending.in/brodkinca/BCA-Laravel-Inspect.png)](http://depending.in/brodkinca/BCA-Laravel-Inspect)
[![Coverage Status](https://coveralls.io/repos/brodkinca/BCA-Laravel-Inspect/badge.png)](https://coveralls.io/r/brodkinca/BCA-Laravel-Inspect)

[![Latest Stable Version](https://poser.pugx.org/bca/laravel-inspect/v/stable.png)](https://packagist.org/packages/bca/laravel-inspect) 
[![Total Downloads](https://poser.pugx.org/bca/laravel-inspect/downloads.png)](https://packagist.org/packages/bca/laravel-inspect) 
[![License](https://poser.pugx.org/bca/laravel-inspect/license.png)](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

### 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.

#### Option 1: Edit composer.json manually

First, add `bca/laravel-inspect` to the `require` section.

```json
{ 
    "require": {
        "bca/laravel-inspect": "@stable"
    }
}
```

Next, update Composer from the Terminal:

```sh
composer update
```

#### Option 2: Install via the command line

```sh
composer require bca/laravel-inspect:dev-master
```

### 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 `php artisan` from the root directory of your Laravel installation to see your new tools!

## Advanced Usage

{'fraction_non_alphanumeric': 0.14013428633311675, 'fraction_numerical': 0.002599090318388564, 'mean_word_length': 4.715346534653466, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 20, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6754272', 'n_tokens_mistral': 1604, 'n_tokens_neox': 1519, 'n_words': 394}