Passed
Push — master ( 4ac306...d2aa89 )
by Mihail
05:30
created

JsonSerializeTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
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 11
ccs 0
cts 2
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
    /**
19
     * Serialize the request object as JSON representation.
20
     *
21
     * @return array Request object properties (not a JSON serialized request object)
22
     */
23
    public function jsonSerialize(): array
24
    {
25
        return get_object_vars($this);
26
    }
27
}
28