@@ 162-165 (lines=4) @@ | ||
159 | { |
|
160 | $namespace = '\\MerchantSafeUnipay\\SDK\\Action'; |
|
161 | $actionClass = $namespace . '\\'. ucfirst($name); |
|
162 | if (!in_array($name, self::$validActions, true) || !class_exists($actionClass)) { |
|
163 | $message = sprintf('%s is not valid MerchantSafeUnipay API action.', $name); |
|
164 | throw new BadMethodCallException($message); |
|
165 | } |
|
166 | return $this->actionFactory($name, $arguments, $namespace); |
|
167 | } |
|
168 | private function getQueryAction(string $name, array $arguments) |
|
@@ 173-176 (lines=4) @@ | ||
170 | $name = str_replace(' ', '', ucwords(str_replace('_', '', $name))); |
|
171 | $namespace = '\\MerchantSafeUnipay\\SDK\\Action\\Query'; |
|
172 | $actionClass = $namespace . '\\'. ucfirst($name); |
|
173 | if (!in_array($name, self::$validQueryActions, true) || !class_exists($actionClass)) { |
|
174 | $message = sprintf('%s is not valid MerchantSafeUnipay API query action.', $name); |
|
175 | throw new BadMethodCallException($message); |
|
176 | } |
|
177 | return $this->actionFactory($name, ['getQuery', $arguments], $namespace); |
|
178 | } |
|
179 |