Mixin::fromVOArray()   A
last analyzed

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\VOArray;
4
5
use BestServedCold\PhalueObjects\VOArray;
6
7
/**
8
 * Class Mixin
9
 *
10
 * @package BestServedCold\PhalueObjects\VOArray
11
 */
12
trait Mixin
13
{
14
    /**
15
     * @param  VOArray $voArray
16
     * @return static
17
     */
18 3
    public static function fromVOArray(VOArray $voArray)
19
    {
20 3
        return static::fromArray($voArray->getValue());
0 ignored issues
show
Bug introduced by
The method fromArray() does not exist on BestServedCold\PhalueObjects\VOArray\Mixin. Did you maybe mean fromVOArray()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
21
    }
22
23
    /**
24
     * @return VOArray
25
     */
26 5
    public function toVOArray()
27
    {
28 5
        return VOArray::fromArray(self::toArray());
29
    }
30
}
31