Passed
Push — master ( 898ee1...a00989 )
by Gregorio
02:43
created

DataMerge::pipe()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Ghc\Rosetta\Pipes;
4
5
use Illuminate\Support\Arr;
6
7
class DataMerge implements Pipeable
8
{
9
    /**
10
     * @param array $options
11
     *
12
     * @return \Closure
13
     */
14
    public function pipe($options = [])
15
    {
16
        return function ($inputData) use ($options) {
17
            return array_merge($inputData, Arr::get($options, 'data'));
18
        };
19
    }
20
}
21