Completed
Pull Request — master (#2)
by Mathieu
01:57
created

JsonSerializableTypedResourceStub::jsonSerialize()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 30
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 30
rs 8.8571
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace LaravelFr\ApiTesting\Tests\Stubs;
4
5
use JsonSerializable;
6
7
class JsonSerializableTypedResourceStub implements JsonSerializable
8
{
9
    public function jsonSerialize()
10
    {
11
        return json_decode('{
12
            "foo": "bar",
13
            "bar": 42,
14
            "foobar": [
15
                "foo",
16
                "bar"
17
            ],
18
            "baz": true,
19
            "nested_foo": {
20
                "foo": "bar",
21
                "bar": 42,
22
                "foobar": [
23
                    "foo",
24
                    "bar"
25
                ],
26
                "baz": false,
27
                "double_nested_foo": {
28
                    "foo": "bar",
29
                    "bar": 42,
30
                    "foobar": [
31
                        "foo",
32
                        "bar"
33
                    ],
34
                    "baz": false
35
                }
36
            }
37
        }');
38
    }
39
}
40