@@ 151-154 (lines=4) @@ | ||
148 | { |
|
149 | $namespace = '\\MerchantSafeUnipay\\SDK\\Action'; |
|
150 | $actionClass = $namespace . '\\'. convertSnakeCase($name); |
|
151 | if (!in_array($name, self::$validActions, true) || !class_exists($actionClass)) { |
|
152 | $message = sprintf('%s is not valid MerchantSafeUnipay API action.', $name); |
|
153 | throw new BadMethodCallException($message); |
|
154 | } |
|
155 | return $this->actionFactory($name, $arguments, $namespace); |
|
156 | } |
|
157 | private function getQueryAction(string $name, array $arguments) |
|
@@ 162-165 (lines=4) @@ | ||
159 | $name = str_replace(' ', '', ucwords(str_replace('_', '', $name))); |
|
160 | $namespace = '\\MerchantSafeUnipay\\SDK\\Action\\Query'; |
|
161 | $actionClass = $namespace . '\\'. convertSnakeCase($name); |
|
162 | if (!in_array($name, self::$validQueryActions, true) || !class_exists($actionClass)) { |
|
163 | $message = sprintf('%s is not valid MerchantSafeUnipay API query action.', $name); |
|
164 | throw new BadMethodCallException($message); |
|
165 | } |
|
166 | return $this->actionFactory($name, ['getQuery', $arguments], $namespace); |
|
167 | } |
|
168 |