Passed
Push — master ( 766df6...286284 )
by Roman
55s
created

Strings.php ➔ export()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace PeacefulBit\Slate\Core\Modules\Strings;
4
5
use PeacefulBit\Slate\Parser\Nodes\NativeExpression;
6
7
function export()
8
{
9
    return [
10
        '@' => [
11
            'concat' => new NativeExpression(function ($eval, array $arguments) {
12
                return array_reduce($arguments, function ($acc, $arg) use ($eval) {
13
                    return $acc . $eval($arg);
14
                }, '');
15
            })
16
        ]
17
    ];
18
}
19