PHPackages                             polymorphine/dev - 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. polymorphine/dev

ActiveLibrary

polymorphine/dev
================

Development tools &amp; coding standard scripts for Polymorphine libraries

0.6.0(1y ago)01.5k↑89.9%11MITPHPPHP ^7.4 || ^8.0

Since Mar 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/polymorphine/dev)[ Packagist](https://packagist.org/packages/polymorphine/dev)[ RSS](/packages/polymorphine-dev/feed)WikiDiscussions develop Synced today

READMEChangelog (10)Dependencies (4)Versions (13)Used By (1)

Polymorphine/Dev
================

[](#polymorphinedev)

[![Latest stable release](https://camo.githubusercontent.com/211deee7cd0d8a2bf0019268c929a44fad1d0608c33a18cbb50074bacaf0821e/68747470733a2f2f706f7365722e707567782e6f72672f706f6c796d6f727068696e652f6465762f76657273696f6e)](https://packagist.org/packages/polymorphine/dev)[![Build status](https://github.com/polymorphine/dev/workflows/build/badge.svg)](https://github.com/polymorphine/dev/actions)[![Coverage status](https://camo.githubusercontent.com/46806276a3d1f7b920e45b149822a6e143cd71a2bc277bfc978589a4f257f3f6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f706f6c796d6f727068696e652f6465762f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/polymorphine/dev?branch=develop)[![PHP version](https://camo.githubusercontent.com/d4bec618949971fe7604167458feac626464c43b8372eaaf976cb9a5e113f1d9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f706f6c796d6f727068696e652f6465762e737667)](https://packagist.org/packages/polymorphine/dev)[![LICENSE](https://camo.githubusercontent.com/465ae5c8a1b25a1d0f436872cccbde1f62dd1d33b13927558a6701c4fd9d2ec1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706f6c796d6f727068696e652f6465762e7376673f636f6c6f723d626c7565)](LICENSE)

### Development tools &amp; coding standard scripts for Polymorphine libraries

[](#development-tools--coding-standard-scripts-for-polymorphine-libraries)

- [PHPUnit](https://github.com/sebastianbergmann/phpunit) testing library.
- Combination of [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)and [CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) with custom settings added as dev dependency of Polymorphine packages.
- Package skeleton scripted with [Skeletons](https://github.com/shudd3r/skeletons) engine.

### Installation with [Composer](https://getcomposer.org/)

[](#installation-with-composer)

```
composer require --dev polymorphine/dev
```

#### PHP-CS-Fixer

[](#php-cs-fixer)

`PHP-CS-Fixer` will automatically fix code formatting, and `CodeSniffer`will check style errors that need to be adjusted manually like: naming conventions, line lengths and some [phpDoc constraints](#codesniffer-custom-phpdoc-requirements).

Fixer needs project scope configuration to set up factory with package name used in a file docBlock headers and absolute path to its root directory. Add [`cs-fixer.php.dist`](cs-fixer.php.dist) configuration file similar to the one supplied with this package to root directory of your project.

Use this command to run fixer for given file or directory (path):

```
vendor/bin/php-cs-fixer fix -v --config=cs-fixer.php.dist --using-cache=no --path-mode=intersection path

```

#### CodeSniffer

[](#codesniffer)

`CodeSniffer` tool is used only because of Fixer limitations. Not every style constraint violation can be automatically fixed, so this tool will inform you about inconsistencies that need manual fixing.

[`phpcs.xml`](phpcs.xml) file is the configuration for all projects using this package as a composer dependency (in default vendor directory). However, console command running CodeSniffer requires the absolute path to this config file. For example Github Action command may build the absolute path with `$GITHUB_WORKSPACE` env variable:

```
vendor/bin/phpcs --extensions=php --standard=$GITHUB_WORKSPACE/vendor/polymorphine/dev/phpcs.xml path

```

#### IDE Setup (PhpStorm)

[](#ide-setup-phpstorm)

###### PHP-CS-Fixer

[](#php-cs-fixer-1)

Use `Setting > Tools > External Tools` to configure `php-cs-fixer` environment:

- `Program:` add path to `vendor/bin/php-cs-fixer` (for Windows: `vendor/bin/php-cs-fixer.bat`)
- `Parameters:` add command fixing currently opened project file: ```
    fix -v --config=cs-fixer.php.dist --using-cache=no --path-mode=intersection "$FileDir$\$FileName$"

    ```

    If you want to add another tool entry with checking command the command above would need additional `--dry-run` switch.
- `Working directory:` set to `$ProjectFileDir$`
- Add keyboard shortcuts to run commands in `Settings > Keymap > External Tool`

###### Code Sniffer

[](#code-sniffer)

Code sniffer does not change the code by itself, so it's better to set is as one of the inspections:

- Add path to local `phpcs` script in `Settings > Languages & Frameworks > PHP > Code Sniffer`
- Set custom ruleset in `Settings > Editor > Inspections > PHP Code Sniffer validation`with absolute path to [`phpcs.xml`](phpcs.xml) file provided with this package - as a project dependency it will be located in `vendor/polymorphine/cs/` directory, and composer's autoload script will be two levels above.

#### CodeSniffer custom PhpDoc requirements

[](#codesniffer-custom-phpdoc-requirements)

- Original public method signatures require phpDoc block comments (their contents are not inspected). Original method is the one that introduces new signature - it doesn't override parent's method nor provides implementation for method defined by an interface. In case of traits every method is considered original.
- PhpDoc's `@param` and `@return` tags with `callable` or `Closure` type require additional description formatted similar to short lambda notation - example: ```
    /**
     * @param Closure $callback fn(Param1Type, Param2Type) => ReturnType
     *
     * @return callable fn(bool) => \FQN\Return\Type
     */
    ```

###  Health Score

35

—

LowBetter than 81% of packages

Maintenance46

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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 ~129 days

Recently: every ~144 days

Total

12

Last Release

420d ago

PHP version history (2 changes)0.1.0PHP ^7.4

0.1.2PHP ^7.4 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![shudd3r](https://avatars.githubusercontent.com/u/9908030?v=4)](https://github.com/shudd3r "shudd3r (267 commits)")

---

Tags

codesniffercoding-standardsdeveloper-toolsphp-cs-fixer

### Embed Badge

![Health badge](/badges/polymorphine-dev/health.svg)

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

###  Alternatives

[bruli/php-git-hooks

Git hooks for PHP projects.

671370.4k5](/packages/bruli-php-git-hooks)[bear/qatools

PHP QA Tools

23115.0k5](/packages/bear-qatools)

PHPackages © 2026

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