https://github.com/veewee/pipe-plugin
https://github.com/veewee/pipe-plugin
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/veewee/pipe-plugin
- Owner: veewee
- Created: 2021-12-29T14:40:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-22T14:50:57.000Z (over 4 years ago)
- Last Synced: 2025-02-01T00:57:43.590Z (over 1 year ago)
- Language: PHP
- Size: 47.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Installation
```shell
git clone https://github.com/veewee/pipe-plugin.git
composer install
```
# Where to find what?
- [pipe](https://github.com/veewee/pipe-plugin/blob/main/src/pipe.php)
- [Plugin](https://github.com/veewee/pipe-plugin/blob/main/src/Psalm/Plugin.php)
- [Plugin listener](https://github.com/veewee/pipe-plugin/blob/main/src/Psalm/PipeArgumentsProvider.php)
## Run analysis
### Plugin issue detections
The plugin validates if the types inside the stages of the pipe combinator line up.
It also validates the amount of arguments!
```shell
./vendor/bin/psalm --no-cache tests/invalid-stages.php
./vendor/bin/psalm --no-cache tests/argument-issues.php
```
### Empty pipe
See https://github.com/vimeo/psalm/issues/7244
Currently, templated arguments are not being resolved in closures / callables
For now, we fall back to the built-in types.
```shell
php tests/empty-pipe.php
php tests/empty-pipe2.php
./vendor/bin/psalm --no-cache tests/empty-pipe.php
./vendor/bin/psalm --no-cache tests/empty-pipe2.php
```
### Other function-likes:
```
php ./vendor/bin/psalm --no-cache tests/functionlike.php
```