Completed
Push — master ( 05aed6...998c1c )
by Jesse
05:22
created

CastedInteger::value()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Stratadox\Hydration\Mapping\Property\Type;
5
6
/**
7
 * Maps scalar input to an integer property in an object property.
8
 *
9
 * @package Stratadox\Hydrate
10
 * @author  Stratadox
11
 */
12
final class CastedInteger extends ScalarValue
13
{
14
    /** @inheritdoc */
15
    public function value(array $data, $owner = null): int
16
    {
17
        return (int) $this->my($data);
18
    }
19
}
20