Completed
Push — master ( 8c9478...0f7d17 )
by Adam
02:25
created

Map   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 14
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromVariadic() 0 6 1
1
<?php
2
3
namespace BestServedCold\PhalueObjects\VOArray;
4
5
use BestServedCold\PhalueObjects\VOArray;
6
use BestServedCold\PhalueObjects\VOClosure;
7
8
/**
9
 * Class Map
10
 *
11
 * @package BestServedCold\PhalueObjects\VOArray
12
 */
13
class Map extends VOArray
14
{
15
    /**
16
     * @param  VOClosure $value
17
     * @param  \array[]  ...$array
18
     * @return static
19
     */
0 ignored issues
show
Documentation introduced by
Should the type for parameter $array not be \array[][]?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
20 3
    public static function fromVariadic(VOClosure $value, array ...$array)
21
    {
22 3
        return new static(
23 3
            call_user_func_array('array_map', array_merge([$value->getValue()], $array))
24 3
        );
25
    }
26
}
27