@@ -29,11 +29,11 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function get(string $field, ?string $value): ?User; |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * Add |
|
| 34 | - * @param array $data |
|
| 35 | - * @return User |
|
| 36 | - */ |
|
| 32 | + /** |
|
| 33 | + * Add |
|
| 34 | + * @param array $data |
|
| 35 | + * @return User |
|
| 36 | + */ |
|
| 37 | 37 | public function add(array $data): User; |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -273,8 +273,8 @@ |
||
| 273 | 273 | return false; |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | - if(isset($message->error)) { |
|
| 277 | - $error = (array)$message->error; |
|
| 276 | + if (isset($message->error)) { |
|
| 277 | + $error = (array) $message->error; |
|
| 278 | 278 | |
| 279 | 279 | if (!isset($error['.tag']) && !in_array($error['.tag'], self::ACCESS_TOKEN_STATUS)) { |
| 280 | 280 | return false; |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function select(...$columns): DbalInterface |
| 33 | 33 | { |
| 34 | - array_walk($columns, function (&$column) { |
|
| 34 | + array_walk($columns, function(&$column) { |
|
| 35 | 35 | if (is_array($column)) { |
| 36 | 36 | $column = array_flip($column); |
| 37 | 37 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function select(...$columns): DbalInterface |
| 33 | 33 | { |
| 34 | - array_walk($columns, function (&$column) { |
|
| 34 | + array_walk($columns, function(&$column) { |
|
| 35 | 35 | if (is_array($column)) { |
| 36 | 36 | $column = array_flip($column); |
| 37 | 37 | } |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | $switch = $nextItem['switch']; |
| 84 | 84 | $joinType = $nextItem['type']; |
| 85 | 85 | |
| 86 | - $queryBuilder->join(function ($item) use ($currentItem, $modelToJoin, $switch, $joinType, $level) { |
|
| 86 | + $queryBuilder->join(function($item) use ($currentItem, $modelToJoin, $switch, $joinType, $level) { |
|
| 87 | 87 | |
| 88 | 88 | $newQueryBuilder = (new self($modelToJoin->table))->getOrmModel()->createQueryBuilder(); |
| 89 | 89 | |
@@ -332,6 +332,6 @@ |
||
| 332 | 332 | */ |
| 333 | 333 | private function columnKey(): int |
| 334 | 334 | { |
| 335 | - return (int)array_key_last($this->columns); |
|
| 335 | + return (int) array_key_last($this->columns); |
|
| 336 | 336 | } |
| 337 | 337 | } |
| 338 | 338 | \ No newline at end of file |
@@ -124,8 +124,9 @@ |
||
| 124 | 124 | */ |
| 125 | 125 | public function verify(string $code): bool |
| 126 | 126 | { |
| 127 | - if (is_null($this->secretKey)) |
|
| 128 | - throw new Exception('The secret key is not set'); |
|
| 127 | + if (is_null($this->secretKey)) { |
|
| 128 | + throw new Exception('The secret key is not set'); |
|
| 129 | + } |
|
| 129 | 130 | |
| 130 | 131 | if (empty($code)) { |
| 131 | 132 | $this->errorCodes = ['internal-empty-response']; |
@@ -158,7 +158,7 @@ |
||
| 158 | 158 | */ |
| 159 | 159 | public function fetchData(): ?array |
| 160 | 160 | { |
| 161 | - return isset($this->fetchedPayload->data) ? (array)$this->fetchedPayload->data : null; |
|
| 161 | + return isset($this->fetchedPayload->data) ? (array) $this->fetchedPayload->data : null; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |
@@ -82,9 +82,9 @@ |
||
| 82 | 82 | if (!empty($value)) { |
| 83 | 83 | $captcha = CaptchaFactory::get(); |
| 84 | 84 | |
| 85 | - if (!$captcha->verify($value)){ |
|
| 85 | + if (!$captcha->verify($value)) { |
|
| 86 | 86 | $errorCode = $captcha->getErrorMessage(); |
| 87 | - $this->addError($field, 'captcha.'.$errorCode, $param); |
|
| 87 | + $this->addError($field, 'captcha.' . $errorCode, $param); |
|
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | } |