PHPackages                             avengerscodelovers/laravel-cs - 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. avengerscodelovers/laravel-cs

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

avengerscodelovers/laravel-cs
=============================

Laravel coding standards config

v0.1.0(1y ago)013MITPHP

Since Oct 8Pushed 1y agoCompare

[ Source](https://github.com/AvengersCodeLovers/laravel-coding-standards)[ Packagist](https://packagist.org/packages/avengerscodelovers/laravel-cs)[ RSS](/packages/avengerscodelovers-laravel-cs/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Laravel CS
==========

[](#laravel-cs)

This project aims to provide a common coding standards, static analysis configuration for Laravel projects.

Purpose
-------

[](#purpose)

The purpose of this project is to share a standardized PHP-CS-Fixer and PHPStan configuration that can be easily used across different Laravel projects. By using this configuration, you can ensure consistent code formatting, style, and static analysis throughout your codebase.

Install
-------

[](#install)

To use this configuration, install this composer package:

```
composer require --dev avengerscodelovers/laravel-cs
```

Usage
-----

[](#usage)

### Code conventions

[](#code-conventions)

You can use PHP-CS-Fixer to check code conventions, format code with `--config` option:

```
./vendor/bin/php-cs-fixer fix --config=./vendor/avengerscodelovers/laravel-cs/.php-cs-fixer.dist.php
```

To incorporate CI integration, you can utilize the following command to verify if the code adheres to the conventions:

```
./vendor/bin/php-cs-fixer fix --dry-run -v --config=./vendor/avengerscodelovers/laravel-cs/.php-cs-fixer.dist.php
```

By using this configuration, PHP-CS-Fixer will apply the defined rules to your codebase, ensuring that it adheres to the coding standards.

You can also add add the PHP-CS-Fixer command to the `composer.json` scripts:

```
    "scripts": {
        "cs": "php-cs-fixer fix --dry-run -v --config=./vendor/avengerscodelovers/laravel-cs/.php-cs-fixer.dist.php",
        "cs:fix": "php-cs-fixer fix -v --config=./vendor/avengerscodelovers/laravel-cs/.php-cs-fixer.dist.php",
    }
```

After adding the script, you can run the PHP-CS-Fixer command by executing the following command in your terminal:

```
composer cs
composer cs:fix
```

### Static analysis

[](#static-analysis)

To perform static analysis on your code and identify potential issues or errors, you can use PHPStan.

First, create a `phpstan.neon` or `phpstan.neon.dist` file in the root of your application. It might look like this:

```
includes:
    - ./vendor/avengerscodelovers/laravel-cs/phpstan.neon

parameters:

    paths:
        - app/

    # Level 9 is the highest level
    level: 5

    ## Exclude files or folder from analysis ##
    # excludePaths:
    #    - app/Modules/*/Tests/*
```

Then you can run PHPStan with the following command:

```
./vendor/bin/phpstan analyze
```

You may add the PHPStan command to the `composer.json` scripts:

```
"scripts": {
    "phpstan": "phpstan analyse --memory-limit 2G"
}
```

After adding the script, you can run PHPStan by executing the following command in your terminal:

```
composer phpstan
```

### Usage with `lint-staged`

[](#usage-with-lint-staged)

You can also integrate with [lint-staged](https://github.com/lint-staged/lint-staged) and pre-commit to automatically run the fixer, static analysis when committing changes:

```
"lint-staged": {
    "*.php": [
        "composer cs:fix",
        "composer phpstan"
    ]
}
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

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

634d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46879803?v=4)[Avengers Unit Code Lovers](/maintainers/avengerscodelovers)[@AvengersCodeLovers](https://github.com/AvengersCodeLovers)

---

Top Contributors

[![tuanpt-0634](https://avatars.githubusercontent.com/u/49387490?v=4)](https://github.com/tuanpt-0634 "tuanpt-0634 (5 commits)")

### Embed Badge

![Health badge](/badges/avengerscodelovers-laravel-cs/health.svg)

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

###  Alternatives

[wp-cli/wp-cli-tests

WP-CLI testing framework

423.1M142](/packages/wp-cli-wp-cli-tests)[worksome/coding-style

Worksomes coding style

49814.9k66](/packages/worksome-coding-style)[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20280.7k20](/packages/shopsys-coding-standards)[ergebnis/rector-rules

Provides rules for rector/rector.

10245.6k51](/packages/ergebnis-rector-rules)

PHPackages © 2026

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