JsonSerializeTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 2
c 2
b 0
f 1
dl 0
loc 10
ccs 0
cts 1
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A jsonSerialize() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the Koded package.
5
 *
6
 * (c) Mihail Binev <[email protected]>
7
 *
8
 * Please view the LICENSE distributed with this source code
9
 * for the full copyright and license information.
10
 *
11
 */
12
13
namespace Koded\Http;
14
15
trait JsonSerializeTrait
16
{
17
    /**
18
     * Serialize the request object as JSON representation.
19
     *
20
     * @return array Request object properties (not a JSON serialized request object)
21
     */
22
    public function jsonSerialize(): array
23
    {
24
        return \get_object_vars($this);
25
    }
26
}
27