Passed
Pull Request — master (#9)
by Quang
09:57
created

JsonDecoder::decode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 4
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Digia\Lumen\GraphQL\Helpers;
4
5
use Digia\JsonHelpers\JsonDecoder as BaseJsonDecoder;
6
7
/**
8
 * Class JsonDecoder
9
 * @package ALehdet\ContentApi\App\Helpers
10
 */
11
class JsonDecoder extends BaseJsonDecoder
12
{
13
14
    /**
15
     * @param string $data
16
     *
17
     * @param bool   $assoc
18
     * @param int    $depth
19
     * @param int    $options
20
     *
21
     * @return array
22
     */
23
    public static function decode(string $data, bool $assoc = false, int $depth = 512, int $options = 0): array
24
    {
25
        // Force associative arrays
26
        return parent::decode($data, true, $depth, $options);
27
    }
28
}
29