Completed
Pull Request — master (#399)
by Anton
04:35
created

JsonSerialize::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Bluz Framework Component
4
 *
5
 * @copyright Bluz PHP Team
6
 * @link https://github.com/bluzphp/framework
7
 */
8
9
declare(strict_types=1);
10
11
namespace Bluz\Common\Container;
12
13
/**
14
 * Container implements JsonSerializable interface
15
 *
16
 * @package  Bluz\Common
17
 * @author   Anton Shevchuk
18
 * @see      JsonSerializable
19
 *
20
 * @method   array toArray()
21
 */
22
trait JsonSerialize
23
{
24
    /**
25
     * Specify data which should be serialized to JSON
26
     *
27
     * @return array
28
     */
29
    public function jsonSerialize()
30
    {
31
        return $this->toArray();
32
    }
33
}
34