PHP code example of jean-beru / pipeline-bundle
1. Go to this page and download the library: Download jean-beru/pipeline-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jean-beru / pipeline-bundle example snippets
return [
...
JeanBeru\PipelineBundle\PipelineBundle::class => ['all' => true],
];
use League\Pipeline\PipelineInterface;
final class MyService
{
private PipelineInterface $someComputationsPipeline;
public function __construct(PipelineInterface $someComputationsPipeline)
{
$this->someComputationsPipeline = $someComputationsPipeline;
}
public function __invoke(int $base)
{
// $base = 2
$result = $this->someComputationsPipeline($base);
// $result = (((2 + 1) + 3) * 4) = 24
// ...
}
}
composer install
vendor/bin/simple-phpunit
vendor/bin/php-cs-fixer fix --dry-run
vendor/bin/phpstan