Passed
Push — main ( d26515...a852c7 )
by Michael
11:51 queued 12s
created

pipeline()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
c 1
b 0
f 1
nc 1
nop 2
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
use MichaelRubel\EnhancedPipeline\Pipeline;
6
7
if (! function_exists('pipeline')) {
8
    /**
9
     * @param  mixed  $passable
10
     * @param  array|mixed  $pipes
11
     *
12
     * @return Pipeline
13
     */
14
    function pipeline($passable, $pipes): Pipeline
15
    {
16 1
        return app(Pipeline::class)
17 1
            ->send($passable)
18 1
            ->through($pipes);
19
    }
20
}
21