CastableToArray   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 3 1
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