SimpleSchemes   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 7
c 1
b 0
f 0
dl 0
loc 48
ccs 0
cts 12
cp 0
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getArraySchema() 0 3 1
A getIntSchema() 0 3 1
A getStringSchema() 0 3 1
A getObjectSchema() 0 3 1
A getNullSchema() 0 3 1
A getFloatSchema() 0 3 1
1
<?php
2
3
/**
4
 * Created by PhpStorm.
5
 * Project: json-rpc-server
6
 * User: sv
7
 * Date: 06.01.2021
8
 * Time: 23:17
9
 */
10
11
declare(strict_types=1);
12
13
namespace Onnov\JsonRpcServer\Model;
14
15
use stdClass;
16
17
/**
18
 * Class SimpleSchemes
19
 *
20
 * @package Onnov\JsonRpcServer\Model
21
 */
22
class SimpleSchemes
23
{
24
    /**
25
     * @return stdClass
26
     */
27
    public function getNullSchema(): stdClass
28
    {
29
        return (object)['type' => 'null'];
30
    }
31
32
    /**
33
     * @return stdClass
34
     */
35
    public function getStringSchema(): stdClass
36
    {
37
        return (object)['type' => 'string'];
38
    }
39
40
    /**
41
     * @return stdClass
42
     */
43
    public function getIntSchema(): stdClass
44
    {
45
        return (object)['type' => 'int'];
46
    }
47
48
    /**
49
     * @return stdClass
50
     */
51
    public function getFloatSchema(): stdClass
52
    {
53
        return (object)['type' => 'float'];
54
    }
55
56
    /**
57
     * @return stdClass
58
     */
59
    public function getArraySchema(): stdClass
60
    {
61
        return (object)['type' => 'array'];
62
    }
63
64
    /**
65
     * @return stdClass
66
     */
67
    public function getObjectSchema(): stdClass
68
    {
69
        return (object)['type' => 'object'];
70
    }
71
}
72