CastableToArray::toArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
/**
4
 * Created by PhpStorm.
5
 * Project: json-rpc-server
6
 * User: sv
7
 * Date: 07.02.2021
8
 * Time: 11:36
9
 */
10
11
declare(strict_types=1);
12
13
namespace Onnov\JsonRpcServer\Definition;
14
15
/**
16
 * Trait CastableToArray
17
 *
18
 * @package Onnov\JsonRpcServer\Definition
19
 */
20
trait CastableToArray
21
{
22
    /**
23
     * @return mixed[]
24
     */
25
    public function toArray(): array
26
    {
27
        return get_object_vars($this);
28
    }
29
}
30