Passed
Pull Request — master (#2)
by Sergey
05:00
created

SimpleSchemes::getArraySchema()   A

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 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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
 * @package Onnov\JsonRpcServer\Model
20
 */
21
class SimpleSchemes
22
{
23
    /**
24
     * @return stdClass
25
     */
26
    public function getNullSchema(): stdClass
27
    {
28
        return (object)['type' => 'null'];
29
    }
30
31
    /**
32
     * @return stdClass
33
     */
34
    public function getStringSchema(): stdClass
35
    {
36
        return (object)['type' => 'string'];
37
    }
38
39
    /**
40
     * @return stdClass
41
     */
42
    public function getIntSchema(): stdClass
43
    {
44
        return (object)['type' => 'int'];
45
    }
46
47
    /**
48
     * @return stdClass
49
     */
50
    public function getFloatSchema(): stdClass
51
    {
52
        return (object)['type' => 'float'];
53
    }
54
55
    /**
56
     * @return stdClass
57
     */
58
    public function getArraySchema(): stdClass
59
    {
60
        return (object)['type' => 'array'];
61
    }
62
63
    /**
64
     * @return stdClass
65
     */
66
    public function getObjectSchema(): stdClass
67
    {
68
        return (object)['type' => 'object'];
69
    }
70
}
71