Completed
Push — master ( b03e32...44190a )
by Sérgio
03:19
created

append.php ➔ append()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 11
Ratio 100 %

Code Coverage

Tests 5
CRAP Score 1
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 11
loc 11
ccs 5
cts 5
cp 1
crap 1
rs 9.4285
1
<?php
2
3
namespace Sergiors\Functional;
4
5
/**
6
 * @author Sérgio Rafael Siqueira <[email protected]>
7
 */
8 View Code Duplication
function append()
0 ignored issues
show
Duplication introduced by
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10 2
    $args = func_get_args();
11
12
    $fn = function ($el, array $ls) {
13 2
        array_push($ls, $el);
14 2
        return $ls;
15 2
    };
16
17 2
    return call_user_func_array(curry($fn), $args);
18
}
19