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

Pair::fromArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace BestServedCold\PhalueObjects\VOString;
4
5
use BestServedCold\PhalueObjects\VOString;
6
use BestServedCold\PhalueObjects\VOArray\Map\Pair as VOArrayPair;
7
8
/**
9
 * Class Pair
10
 *
11
 * @package BestServedCold\PhalueObjects\VOString
12
 */
13
class Pair extends VOString
14
{
15
    /**
16
     * @param array $array
17
     * @return string
0 ignored issues
show
Documentation introduced by
Should the return type not be Pair?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
18
     */
19 1
    public static function fromArray(array $array)
20
    {
21 1
        return new static(VOArrayPair::fromArray($array)->implode(','));
22
    }
23
}
24