ArrayType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A convertToModlrValue() 0 8 2
1
<?php
2
3
namespace As3\Modlr\DataTypes\Types;
4
5
/**
6
 * The array data type converter.
7
 *
8
 * @author Jacob Bare <[email protected]>
9
 */
10
class ArrayType implements TypeInterface
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function convertToModlrValue($value)
16
    {
17
        if (empty($value)) {
18
            return [];
19
        }
20
        (Array) $value;
21
        return array_values($value);
22
    }
23
}
24