PHPackages                             fp4php/functional-psalm-plugin - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fp4php/functional-psalm-plugin

ActivePsalm-plugin[Utility &amp; Helpers](/categories/utility)

fp4php/functional-psalm-plugin
==============================

v1.0.0(2y ago)11.9k↓100%MITPHPPHP ^8.1

Since May 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fp4php/functional-psalm-plugin)[ Packagist](https://packagist.org/packages/fp4php/functional-psalm-plugin)[ RSS](/packages/fp4php-functional-psalm-plugin/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

fp4php/functional psalm plugin
==============================

[](#fp4phpfunctional-psalm-plugin)

[![psalm level](https://camo.githubusercontent.com/509b590ecbc59caf998d2044be26b01c0e613fc6162dceb31bf2a4147d345388/68747470733a2f2f73686570686572642e6465762f6769746875622f6670347068702f66756e6374696f6e616c2d7073616c6d2d706c7567696e2f6c6576656c2e737667)](https://camo.githubusercontent.com/509b590ecbc59caf998d2044be26b01c0e613fc6162dceb31bf2a4147d345388/68747470733a2f2f73686570686572642e6465762f6769746875622f6670347068702f66756e6374696f6e616c2d7073616c6d2d706c7567696e2f6c6576656c2e737667)[![psalm type coverage](https://camo.githubusercontent.com/259e345c6c65fb489fa2edd7c1130bb7a35cf4852b01b23fd8e607702b40a2f8/68747470733a2f2f73686570686572642e6465762f6769746875622f6670347068702f66756e6374696f6e616c2d7073616c6d2d706c7567696e2f636f7665726167652e737667)](https://camo.githubusercontent.com/259e345c6c65fb489fa2edd7c1130bb7a35cf4852b01b23fd8e607702b40a2f8/68747470733a2f2f73686570686572642e6465762f6769746875622f6670347068702f66756e6374696f6e616c2d7073616c6d2d706c7567696e2f636f7665726167652e737667)

Installation
------------

[](#installation)

Supported installation method is via [composer](https://getcomposer.org):

```
composer require fp4php/functional-psalm-plugin --dev
```

Usage
-----

[](#usage)

To enable the plugin, add the `Fp\PsalmPlugin\FunctionalPlugin` class to your psalm configuration using `psalm-plugin` binary as follows:

```
php vendor/bin/psalm-plugin enable fp4php/functional-psalm-plugin
```

Features
--------

[](#features)

- #### filter

    [](#filter)

Plugin add type narrowing for filtering.

`Fp\Functional\Option\Option::filter`:

```
