PHPackages                             spindogs/phpcs - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. spindogs/phpcs

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

spindogs/phpcs
==============

Spindogs coding standards

02.0kPHP

Since Sep 19Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

PSR-1 and PSR-2
---------------

[](#psr-1-and-psr-2)

All PHP code MUST abide by the standards as described by PSR-1 and PSR-2. These recommendations can be read in full at .

For ease of use, a summary of these standards is described below.

### Legacy code

[](#legacy-code)

Whilst all new code (including new code added to old files) MUST follow these standards, you are NOT expected to convert any existing legacy code to these standards.

### Files

[](#files)

- All PHP files MUST use the Unix LF (linefeed) line ending

### Indenting

[](#indenting)

- Code MUST use 4 spaces for indenting, not tabs

### PHP keywords

[](#php-keywords)

- PHP keywords MUST be in lowercase (eg. `if`, `while`, `for`, etc)
- The PHP constants `true`, `false`, and `null` MUST be in lowercase

### Naming

[](#naming)

PSR-1 standards do not make any recommendation regarding the naming of your code other than stating that a consistent style must be used across the board. As a result, Spindogs prefers the following naming styles:

- Constants MUST be declared in **UPPERCASE** (with underscore separators)
- Class names MUST be declared in **TitleCase**
- Method names MUST be declared in **camelCase**
- Property names MUST be declared in **snake\_case**
- Variables MUST be declared in **snake\_case**

### Global functions

[](#global-functions)

The use of global functions SHOULD be avoided at every opportunity, instead helper functions should be encapsulated within a class

### Classes

[](#classes)

Visibility (`public`, `protected`, `private`) MUST be declared on all properties

```

```

In order to aid readability, the **null coalescing** operator MAY be used to provide a default value if a variable doesn't exist:

```

```

Similarly, the **elvis operator** MAY be used to provide a default value if a variable is not truthy:

```

```

### Database

[](#database)

All database tables MUST be named using **TitleCase** and singularly (to match model name):

```
Event
EventCategory

```

All database columns MUST be named using **snake\_case**:

```
event_id
name

```

Code Editors
------------

[](#code-editors)

### Atom

[](#atom)

You can install the Atom Beautify package and configure it to use Spindogs coding standards each time you save a PHP file .

1. Download latest `php-cs-fixer.phar` to your PHP directory on local machine
2. Clone this GIT repository to a location on your local machine
3. Install `atom-beautify` package from settings screen
4. Configure path to the `php-cs-fixer.phar` executable
5. Configure path to the Spindogs `.php_cs.dist` file
6. Enable PHP files to beautify on save

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0dd8906eccff8ca99b4a04b796c96fef7967497538a36d567ef6aa6b1e1cf9f9?d=identicon)[spindogs](/maintainers/spindogs)

---

Top Contributors

[![ol1s](https://avatars.githubusercontent.com/u/12654315?v=4)](https://github.com/ol1s "ol1s (3 commits)")

### Embed Badge

![Health badge](/badges/spindogs-phpcs/health.svg)

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

###  Alternatives

[league/container

A fast and intuitive dependency injection container.

86787.8M343](/packages/league-container)[stella-maris/clock

A pre-release of the proposed PSR-20 Clock-Interface

7947.5M2](/packages/stella-maris-clock)[wptrt/wpthemereview

PHP\_CodeSniffer rules (sniffs) to verify theme compliance with the rules for theme hosting on wordpress.org

217736.5k29](/packages/wptrt-wpthemereview)[inpsyde/modularity

Modular PSR-11 implementation for WordPress plugins, themes or libraries.

54383.3k3](/packages/inpsyde-modularity)[php-standard-library/phpstan-extension

PHPStan PSL extension

201.2M13](/packages/php-standard-library-phpstan-extension)[elie29/zend-phpdi-config

PSR-11 PHP-DI autowire container configurator for Laminas, Mezzio, ZF2, ZF3 and Zend Expressive applications

20238.6k7](/packages/elie29-zend-phpdi-config)

PHPackages © 2026

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