PHPackages                             pragmarx/laravelcs - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pragmarx/laravelcs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pragmarx/laravelcs
==================

PHP\_CodeSniffer custom Sniff for Laravel coding standard

v0.1.0(11y ago)236111.7k↑158.3%33[11 issues](https://github.com/antonioribeiro/laravelcs/issues)[3 PRs](https://github.com/antonioribeiro/laravelcs/pulls)2BSD-3-ClausePHP

Since Dec 9Pushed 4y ago6 watchersCompare

[ Source](https://github.com/antonioribeiro/laravelcs)[ Packagist](https://packagist.org/packages/pragmarx/laravelcs)[ RSS](/packages/pragmarx-laravelcs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (2)

Laravel PHP\_CodeSniffer
========================

[](#laravel-php_codesniffer)

### This is a custom Sniff to detect violations and reformat PHP source code based on [Laravel Coding Standard](http://laravel.com/docs/4.2/contributions#coding-style).

[](#this-is-a-custom-sniff-to-detect-violations-and-reformat-php-source-code-based-on-laravel-coding-standard)

Your source code will be checked for PSR-1 &amp; the Laravel "flavor" of PSR-2.

### Usage wih git

[](#usage-wih-git)

Clone this repository

```
git clone http://github.com/antonioribeiro/laravelcs LaravelCodeSniffer

```

Execute CodeSniffer

```
phpcs --standard=LaravelCodeSniffer/Standards/Laravel/  /path/to/your/project/files

```

### Usage with [Composer](https://getcomposer.org/doc/00-intro.md#installation-nix)

[](#usage-with-composer)

The recommended way is to install it globally with the following command:

```
composer global require pragmarx/laravelcs

```

Make sure you have `~/.composer/vendor/bin/` in your PATH.

You will then be able to run PHP Code Sniffer with the Laravel Standard:

```
phpcs --standard=$HOME/.composer/vendor/pragmarx/laravelcs/Standards/Laravel/ /path/to/your/project/files

```

### Testing the Sniff

[](#testing-the-sniff)

This Sniff was tested using the Laravel Framework source code and some changes, to comply with PSR-2, were required, [click here to see them](http://github.com/antonioribeiro/laravelcs/compare/096884846fa385e54a7e4eeb43547a9137fdf047...d78508f9e5633bc0f776f730dcc6f1e0a9c8daec). Those were the violations found and fixed in Filesystem.php:

```
 --------------------------------------------------------------------------------
 FOUND 14 ERRORS AFFECTING 11 LINES
 --------------------------------------------------------------------------------
   29 | ERROR | [x] Inline control structures are not allowed
   44 | ERROR | [x] Inline control structures are not allowed
  113 | ERROR | [x] Expected 1 new line after closing parenthesis; found " "
  113 | ERROR | [x] Expected 1 newline after opening brace; 0 found
  113 | ERROR | [x] Inline control structures are not allowed
  113 | ERROR | [x] Closing brace must be on a line by itself
  241 | ERROR | [x] Inline control structures are not allowed
  247 | ERROR | [ ] Opening brace should be on the same line as the declaration
  249 | ERROR | [x] Closing brace indented incorrectly; expected 2 spaces, found 3
  310 | ERROR | [x] Inline control structures are not allowed
  335 | ERROR | [x] Inline control structures are not allowed
  343 | ERROR | [x] Inline control structures are not allowed
  361 | ERROR | [x] Inline control structures are not allowed
  384 | ERROR | [x] Inline control structures are not allowed
 --------------------------------------------------------------------------------
 PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
 --------------------------------------------------------------------------------

```

### Contributing

[](#contributing)

There are probably still a lot to do here, so please, open issues and send pull requests.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.5% 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

Unknown

Total

1

Last Release

4178d ago

### Community

Maintainers

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

---

Top Contributors

[![antonioribeiro](https://avatars.githubusercontent.com/u/3182864?v=4)](https://github.com/antonioribeiro "antonioribeiro (23 commits)")[![bryant1410](https://avatars.githubusercontent.com/u/3905501?v=4)](https://github.com/bryant1410 "bryant1410 (1 commits)")[![franzyke](https://avatars.githubusercontent.com/u/3132257?v=4)](https://github.com/franzyke "franzyke (1 commits)")[![mvpasarel](https://avatars.githubusercontent.com/u/642453?v=4)](https://github.com/mvpasarel "mvpasarel (1 commits)")

---

Tags

code-sniffercoding-standardslaravelphpstandardslaravelPHP\_CodeSniffercodesniffer

### Embed Badge

![Health badge](/badges/pragmarx-laravelcs/health.svg)

```
[![Health](https://phpackages.com/badges/pragmarx-laravelcs/health.svg)](https://phpackages.com/packages/pragmarx-laravelcs)
```

###  Alternatives

[phpcsstandards/phpcsutils

A suite of utility functions for use with PHP\_CodeSniffer

6333.4M58](/packages/phpcsstandards-phpcsutils)[stechstudio/laravel-php-cs-fixer

Easily format your Laravel Code with this Configuration file and accompanying artisan command.

146718.6k2](/packages/stechstudio-laravel-php-cs-fixer)[amirezaeb/heroqr

A Powerful QR Code Management Library For PHP

9510.3k](/packages/amirezaeb-heroqr)[lara-zeus/popover

Zeus Popover is filamentphp component to show a Popover with custom content in tables and infolist

2968.2k3](/packages/lara-zeus-popover)[lara-zeus/quantity

filamentphp Input Number component, with user-friendly increment and decrement controls

2065.8k3](/packages/lara-zeus-quantity)[lara-zeus/accordion

Zeus Accordion is filamentphp layout component to group components

11122.8k2](/packages/lara-zeus-accordion)

PHPackages © 2026

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