cds-uwb/php-code-style

CDS team PHP coding style for PHP-CS-Fixer

Maintainers

Package info

github.com/CDS-UWB/php-code-style

pkg:composer/cds-uwb/php-code-style

Statistics

Installs: 217

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-03-12 13:04 UTC

This package is auto-updated.

Last update: 2026-03-17 11:18:35 UTC


README

PHP Code Style

Tests

This repository contains the PHP CS Fixer coding style rules for CDS team PHP projects.

Use the \Cds\PhpCodeStyle\rules() function to get all rules as an array. You can pass additional rules to extend the set, or override existing ones as needed.

The rules are also available via the \Cds\PhpCodeStyle\Rules constant.

Usage

# .php-cs-fixer.dist.php
<?php

$finder = PhpCsFixer\Finder::create()
    ->ignoreUnreadableDirs()
    ->exclude('db')
    ->exclude('log')
    ->exclude('temp')
    ->in(__DIR__)
;

return (new PhpCsFixer\Config())
    ->setRules(\Cds\PhpCodeStyle\rules())
    ->setFinder($finder)
;