Mixin   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fromVOArray() 0 4 1
A toVOArray() 0 4 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