figlab/coding-standard

PHPCS coding-standard for Laravel applications.

Maintainers

Package info

github.com/figlabhq/coding-standard

Type:phpcodesniffer-standard

pkg:composer/figlab/coding-standard

Statistics

Installs: 1 444

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

2.0.0 2026-06-18 04:16 UTC

This package is auto-updated.

Last update: 2026-06-18 04:19:51 UTC


README

PHPCS coding-standard for Laravel applications and packages. Based on the awesome IxDF Coding Standard.

Requirements

  • PHP 8.3 or higher
  • PHP_CodeSniffer 4.x

Upgrading from 1.x? Version 2.0 raises the minimum PHP version to 8.3 and moves to PHP_CodeSniffer 4. PHPCS 4 can surface new findings and apply different auto-fixes than 3.x, so review the results after upgrading. Projects that are not yet ready can stay on the ^1.0 line.

Installation

  1. Install the package via composer by running:
composer require --dev figlab/coding-standard
  1. Add composer scripts into your composer.json:
"scripts": {
  "cs:check": "phpcs -p -s --colors --report-full --report-summary",
  "cs:fix": "phpcbf -p --colors"
}
  1. Create file phpcs.xml on base path of your repository with content
<?xml version="1.0"?>
<ruleset name="My Coding Standard">
    <!-- Include all rules from the IxDF Coding Standard -->
    <rule ref="FigLabCodingStandard"/>

    <!-- Paths to check -->
    <file>app</file>
    <file>config</file>
    <file>database</file>
    <file>lang</file>
    <file>routes</file>
    <file>tests</file>
</ruleset>

Usage

  • To run checks only:
composer cs:check
  • To automatically fix CS issues:
composer cs:fix