Test Failed
Pull Request — master (#11)
by Pavel
07:46
created

BuiltinNormalizerAdapter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A normalize() 0 8 2
1
<?php
2
3
namespace Bankiru\Api\JsonRpc\Adapters\Builtin;
4
5
use Bankiru\Api\JsonRpc\NormalizerInterface;
6
7
final class BuiltinNormalizerAdapter implements NormalizerInterface
8
{
9
    /** {@inheritdoc} */
10
    public function normalize($entity, array $context = [])
11
    {
12
        if (null === $entity) {
13
            return null;
14
        }
15
16
        return json_decode(json_encode($entity), true);
17
    }
18
}
19