File tree Expand file tree Collapse file tree 1 file changed +21
-22
lines changed Expand file tree Collapse file tree 1 file changed +21
-22
lines changed Original file line number Diff line number Diff line change @@ -108,33 +108,32 @@ public function __call(string $name, array $arguments)
108
108
{
109
109
if ('getTypeName ' === $ name )
110
110
{
111
- return $ this ->typeName ;
112
- }
113
- elseif ('getTypeValue ' === $ name )
114
- {
115
- return $ this ->type ;
116
- }
117
- }
118
-
119
- /**
120
- * @return mixed
121
- */
122
- public static function __callStatic (string $ name , array $ arguments )
123
- {
124
- if ('getTypeName ' === $ name )
125
- {
126
- return self ::TYPE_MAP [$ arguments [0 ] ?? null ] ?? null ;
111
+ if ($ arguments )
112
+ {
113
+ return self ::TYPE_MAP [$ arguments [0 ] ?? null ] ?? null ;
114
+ }
115
+ else
116
+ {
117
+ return $ this ->typeName ;
118
+ }
127
119
}
128
120
elseif ('getTypeValue ' === $ name )
129
121
{
130
- $ value = array_search ($ arguments [0 ] ?? null , self ::TYPE_MAP );
131
- if (false === $ value )
122
+ if ($ arguments )
132
123
{
133
- return self ::TYPE_UNKNOWN ;
124
+ $ value = array_search ($ arguments [0 ] ?? null , self ::TYPE_MAP );
125
+ if (false === $ value )
126
+ {
127
+ return self ::TYPE_UNKNOWN ;
128
+ }
129
+ else
130
+ {
131
+ return $ value ;
132
+ }
134
133
}
135
134
else
136
135
{
137
- return $ value ;
136
+ return $ this -> type ;
138
137
}
139
138
}
140
139
}
@@ -159,15 +158,15 @@ public function getType(): int
159
158
public function setType (int $ type ): self
160
159
{
161
160
$ this ->type = $ type ;
162
- $ this ->typeName = static :: getTypeName ($ type );
161
+ $ this ->typeName = $ this -> getTypeName ($ type );
163
162
164
163
return $ this ;
165
164
}
166
165
167
166
public function setTypeName (string $ typeName ): self
168
167
{
169
168
$ this ->typeName = $ typeName ;
170
- $ this ->type = static :: getTypeValue ($ typeName );
169
+ $ this ->type = $ this -> getTypeValue ($ typeName );
171
170
172
171
return $ this ;
173
172
}
You can’t perform that action at this time.
0 commit comments