@@ -99,29 +99,29 @@ discard block |
||
99 | 99 | |
100 | 100 | protected $params = []; |
101 | 101 | |
102 | - protected function getParams(){ |
|
102 | + protected function getParams() { |
|
103 | 103 | $params = []; |
104 | 104 | foreach ($this->paramsSettings as $field => $settings) { |
105 | 105 | $value = null; |
106 | 106 | if (array_key_exists($field, $this->params) && (!array_key_exists(self::PARAM_SLUG_VARIABLE, $settings) ^ (array_key_exists(self::PARAM_SLUG_VARIABLE, $settings) && $settings[self::PARAM_SLUG_VARIABLE] === false))) { |
107 | 107 | $value = $this->params[$field]; |
108 | 108 | } |
109 | - if(array_key_exists(self::PARAM_SLUG_DEFAULT, $settings)) { |
|
109 | + if (array_key_exists(self::PARAM_SLUG_DEFAULT, $settings)) { |
|
110 | 110 | $value = $settings[self::PARAM_SLUG_DEFAULT]; |
111 | 111 | } |
112 | - if(array_key_exists(self::PARAM_SLUG_SPEC, $settings) && array_key_exists($settings[self::PARAM_SLUG_SPEC], $this->paramsSpec)) { |
|
112 | + if (array_key_exists(self::PARAM_SLUG_SPEC, $settings) && array_key_exists($settings[self::PARAM_SLUG_SPEC], $this->paramsSpec)) { |
|
113 | 113 | $value = $this->paramsSpec[$settings[self::PARAM_SLUG_SPEC]]; |
114 | 114 | } |
115 | - if(array_key_exists(self::PARAM_SLUG_REQUIRE, $settings) && $settings[self::PARAM_SLUG_REQUIRE] === true && is_null($value)) { |
|
115 | + if (array_key_exists(self::PARAM_SLUG_REQUIRE, $settings) && $settings[self::PARAM_SLUG_REQUIRE] === true && is_null($value)) { |
|
116 | 116 | throw new Exception('Нет данных'); |
117 | 117 | } |
118 | - if(array_key_exists($field, $this->paramsNames)) { |
|
118 | + if (array_key_exists($field, $this->paramsNames)) { |
|
119 | 119 | switch ($settings[self::PARAM_SLUG_TYPE]) { |
120 | 120 | case self::PARAM_FIELD_TYPE_INTEGER: |
121 | - $params[$this->paramsNames[$field]] = (int)$value; |
|
121 | + $params[$this->paramsNames[$field]] = (int) $value; |
|
122 | 122 | break; |
123 | 123 | case self::PARAM_FIELD_TYPE_STRING: |
124 | - $params[$this->paramsNames[$field]] = (string)$value; |
|
124 | + $params[$this->paramsNames[$field]] = (string) $value; |
|
125 | 125 | break; |
126 | 126 | } |
127 | 127 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | return [ |
204 | 204 | 'method' => 'post', |
205 | 205 | 'key' => $this->apiKey, |
206 | - 'file' => (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($filePath) : '@'.$filePath, |
|
206 | + 'file' => (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($filePath) : '@' . $filePath, |
|
207 | 207 | 'phrase' => $this->isPhrase, |
208 | 208 | 'regsense' => $this->isRegSense, |
209 | 209 | 'numeric' => $this->isNumeric, |