Test Setup Failed
Push — master ( 29d7f6...b0c19c )
by Php Easy Api
03:16
created

ClientAbstract::getAutoGenerators()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Resta\Client;
4
5
abstract class ClientAbstract
6
{
7
    /**
8
     * @var array $inputs
9
     */
10
    protected $inputs = [];
11
12
    /**
13
     * @var array $origin
14
     */
15
    protected $origin = [];
16
17
    /**
18
     * get inputs
19
     *
20
     * @return array
21
     */
22
    protected function get()
23
    {
24
        return $this->inputs;
25
    }
26
27
    /**
28
     * get auto generators data
29
     *
30
     * @return mixed
31
     */
32
    protected function getAutoGenerators()
33
    {
34
        if(property_exists($this,'auto_generators')){
35
            return $this->auto_generators;
36
        }
37
        return [];
38
39
    }
40
41
    /**
42
     * get auto_generators_dont_overwrite
43
     *
44
     * @return mixed
45
     */
46
    protected function getAutoGeneratorsDontOverwrite()
47
    {
48
        if(property_exists($this,'auto_generators_dont_overwrite')){
49
            return $this->auto_generators_dont_overwrite;
50
        }
51
        return [];
52
53
    }
54
55
    /**
56
     * get client objects
57
     *
58
     * @return array
59
     */
60
    protected function getClientObjects()
61
    {
62
        return array_diff_key($this->getObjects(),['inputs'=>[]]);
63
    }
64
65
    /**
66
     * get generators data
67
     *
68
     * @return mixed
69
     */
70
    protected function getGenerators()
71
    {
72
        if(property_exists($this,'generators')){
73
            return $this->generators;
74
        }
75
        return [];
76
77
    }
78
79
    /**
80
     * get auto_generators_dont_overwrite
81
     *
82
     * @return mixed
83
     */
84
    protected function getGeneratorsDontOverwrite()
85
    {
86
        if(property_exists($this,'generators_dont_overwrite')){
87
            return $this->generators_dont_overwrite;
88
        }
89
        return [];
90
91
    }
92
93
    /**
94
     * get object vars
95
     *
96
     * @return array
97
     */
98
    protected function getObjects()
99
    {
100
        return get_object_vars($this);
101
    }
102
103
    /**
104
     * get origin
105
     *
106
     * @return array
107
     */
108
    protected function getOrigin()
109
    {
110
        return $this->origin;
111
    }
112
}