New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

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.
48,364 12

Larablocks Analysis

socialengine/sniffer-rules works with Laravel 4 and 5 (latest release 2.3.0, Sep 29, 2017), all past end of life: no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 4 and 5, past end of life
  • No release in the last 12 months (last: Sep 29, 2017)
  • 31 downloads a month (needs 10,000)
  • 12 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Sep 29, 2017.
  • No releases in the last 12 months.
  • First released: Sep 20, 2014.
  • Monthly downloads: 31, up 1450% from six months ago.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.

Install
composer require socialengine/sniffer-rules
Latest Version:2.3.0
PHP:>=5.4.0
Laravel:4 · 5
License:MIT
Last Updated:Sep 29, 2017
Links: GitHub  ·  Packagist
Maintainer: smazurov

phpcs 2.0+ Laravel 5, Lumen 5 Command

Build Status Latest Stable Version License

This is a Laravel 5 package that hooks up SquizLabs CodeSniffer 2 into Laravel-based apps. It can also be used manually, so read on.

Detect violations of a defined coding standard. It helps your code remain clean and consistent. Available options are: PSR2, PSR1, Zend, PEAR, Squiz, PHPCS and SocialEngine.

Setup

Require this package in composer:

$ composer require socialengine/sniffer-rules
Laravel 5

In your config/app.php add 'SocialEngine\SnifferRules\ServiceProvider' to $providers array:

'providers' => [
    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    
    'SocialEngine\SnifferRules\ServiceProvider',

],
Laravel 5: Publish the configuration file
$ php artisan vendor:publish
Manual

Install our Standard by configuring PHP_CodeSniffer to look for it.

$ php ./vendor/bin/phpcs --config-set installed_paths ./vendor/socialengine/src/Socialengine/SnifferRules/Standard/

Usage

Laravel
$ php artisan sniff

To run the sniffer in a CI environment, the -n option should be set to remove interaction:

$ php artisan sniff -n
Manual
$ php ./vendor/bin/phpcs --standard=SocialEngine path/to/code 

It's encouraged to add a Makefile to your project that makes it trivial for other developers. Use Makefile in this directory and adjust as needed to fit your project requirements.

Travis

In combination with the Makefile, Travis has issues finding the standard, we had to add a before_script to make it work. See Unum repo for example.

before_script: php ./vendor/bin/phpcs --config-set installed_paths "`pwd`/vendor/socialengine/sniffer-rules/src/SocialEngine/SnifferRules/Standard/"

SocialEngine Coding Standards

Coding standards

Addendum and Clarifications
  • namespace should be on the same line as opening php tag. e.g.: <?php namespace SocialEngine\Amazing
  • Property names should be camelCase
  • Test names should use underscores, not camelCase. e.g.: test_cats_love_catnip

License

MIT

Alternatives to socialengine/sniffer-rules

nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660
timwassenburg/laravel-service-generator

Generate Laravel services

317,449 103
rahul900day/laravel-console-spinner

Laravel Console Spinner is a spinner output for Laravel command line.

137,221 76
niellles/lumen-commands

Adds artisan commands to Lumen that aren't available by default.

62,364 18

Version History

Version Released PHP Laravel License
2.3.0 >=5.4.0 ~4.0|~5.0 MIT
2.2.1 >=5.4.0 ~4.0|~5.0 MIT
2.2.0 >=5.4.0 ~4.0|~5.0 MIT
2.1.3 >=5.4.0 ~4.0|5.0.* MIT
2.1.2 >=5.4.0 ~4.0|5.0.* MIT