ObjectType::convertToModlrValue()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
3
namespace As3\Modlr\DataTypes\Types;
4
5
/**
6
 * The object data type converter.
7
 *
8
 * @author Jacob Bare <[email protected]>
9
 */
10
class ObjectType implements TypeInterface
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function convertToModlrValue($value)
16
    {
17
        if (empty($value)) {
18
            return null;
19
        }
20
        return (Object) $value;
21
    }
22
}
23