Completed
Push — master ( 3607c7...59cd47 )
by Chris
03:04
created

SafeNodeFactory::createNodeFromArrayValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 3
crap 1
1
<?php declare(strict_types=1);
2
3
namespace DaveRandom\Jom;
4
5
final class SafeNodeFactory extends NodeFactory
6
{
7
    /**
8
     * @inheritdoc
9
     */
10 64
    protected function createNodeFromArrayValue(array $array, ?Document $ownerDoc, int $flags): VectorNode
11
    {
12 64
        return $this->createArrayNodeFromPackedArray($array, $ownerDoc, $flags);
13
    }
14
15
    /**
16
     * @inheritdoc
17
     */
18 64
    protected function createNodeFromObjectValue(object $object, ?Document $ownerDoc, int $flags): ?Node
19
    {
20 64
        return $this->createObjectNodeFromPropertyMap($object, $ownerDoc, $flags);
21
    }
22
}
23