PHPackages                             elplaza/mypsr - 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. elplaza/mypsr

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

elplaza/mypsr
=============

My PHP Coding Standars

v1.0.8(7y ago)014MITPHPPHP &gt;=7.2

Since Jan 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/elplaza/mypsr)[ Packagist](https://packagist.org/packages/elplaza/mypsr)[ RSS](/packages/elplaza-mypsr/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (10)Used By (0)

My PHP Coding Standard
======================

[](#my-php-coding-standard)

### Installazione

[](#installazione)

Lo standard definito è lo standard che in teoria uno vuole utilizzare in tutti i progetti, quindi dev'essere installato globalmente. Per essere utilizzato in modo "agile" va installato l'opportuno plugin dell'editor e configurato.

Usando [SublimeText 3](https://www.sublimetext.com/3), il plugin che consiglio è [Phpcs](https://packagecontrol.io/packages/Phpcs). Questo plugin può usare diversi tools quali lo [sniffer](https://packagist.org/packages/squizlabs/php_codesniffer), il linter, il [mess detector](https://packagist.org/packages/phpmd/phpmd), il [fixer](https://packagist.org/packages/friendsofphp/php-cs-fixer) etc... che verranno installati globalmente una volta installato questo: `composer global require elplaza/mypsr`

p.s. per aggiornare i pacchetti installati globalmente lanciare: `composer global update`

Una volta installati i tools, questi, come lo standard da usare, vanno comunicati al plugin tramite il file di configurazione (Preferences --&gt; Package Settings --&gt; PHP Code Sniffer --&gt; Settings User), per es.:

```
{
	"show_debug"                  : false,
	"phpcs_executable_path"       : "~/.composer/vendor/bin/phpcs",
	"phpcbf_executable_path"      : "~/.composer/vendor/bin/phpcbf",
	"php_cs_fixer_executable_path": "~/.composer/vendor/bin/php-cs-fixer",
	"phpmd_executable_path"       : "~/.composer/vendor/bin/phpmd",
	"phpcs_show_quick_panel"      : true,
	"phpcbf_on_save"              : true,
	"php_cs_fixer_on_save"        : false,
	"phpmd_run"                   : true,
	"phpcs_additional_args"       : {
        "--standard": "~/.composer/vendor/elplaza/mypsr/src/MyPSR",
        "-n": ""
    },
    "phpcbf_additional_args": {
        "--standard": "~/.composer/vendor/elplaza/mypsr/src/MyPSR",
        "-n": ""
    }
}

```

🪲 tip: se il plugin non sembra funzionare, abilitare il `show_debug` e aprire la console di Sublime.

### Lanciare i test

[](#lanciare-i-test)

Per lanciare i test del MyPSR basta:

- lanciare un test singolo: `./vendor/bin/phpunit src/MyPSR/Tests/WhiteSpace/BracketsUnitTest.php`
- lanciare tutti i test: `./vendor/bin/phpunit --testsuite MyPSR`

Utile per testare il nostro PSR:

- tutto lo standard: `./vendor/bin/phpcs -s -vvv --standard=./src/MyPSR testfile.php`
- solo uno sniff: `./vendor/bin/phpcs -s -vvv --standard=./src/MyPSR --sniffs=MyPSR.Arrays.Multiline testfile.php`
- per il fixer: `./vendor/bin/phpcbf -vvv --standard=./src/MyPSR --sniffs=MyPSR.Arrays.Multiline testfile.php`

### Comandi utili

[](#comandi-utili)

Comandi utili:

- stampa la lista dei coding standard installati: `./vendor/bin/phpcs -i`
- stampa tutti gli sniff presenti nello standard specificato: `./vendor/bin/phpcs -e --standard=PSR2`
- stampa la documentazione per ogni sniff dello standard: `./vendor/bin/phpcs --generator=Text --standard=./src/MyPSR`
- stampa la documentazione per il singolo sniff: `./vendor/bin/phpcs --generator=Text --standard=./src/MyPSR --sniffs=MyPSR.Arrays.Multiline`

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~1 days

Total

9

Last Release

2653d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d101e5bb039aedc830473abecedcc9c424f919671358bb681b3cd30c1e509b7?d=identicon)[elplaza](/maintainers/elplaza)

---

Top Contributors

[![elplaza](https://avatars.githubusercontent.com/u/10348142?v=4)](https://github.com/elplaza "elplaza (11 commits)")

---

Tags

psrphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/elplaza-mypsr/health.svg)

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

###  Alternatives

[lctrs/psalm-psr-container-plugin

Let Psalm understand better psr11 containers

17648.1k13](/packages/lctrs-psalm-psr-container-plugin)[mayflower/mo4-coding-standard

PHP CodeSniffer ruleset implementing the MO4 coding standards extending the Symfony coding standards.

17508.3k5](/packages/mayflower-mo4-coding-standard)

PHPackages © 2026

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