@@ -40,7 +40,7 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public function get(): array |
| 42 | 42 | { |
| 43 | - return array_map(function ($element) { |
|
| 43 | + return array_map(function($element) { |
|
| 44 | 44 | $item = clone $this; |
| 45 | 45 | $item->data = $element; |
| 46 | 46 | $item->modifiedFields = $element; |
@@ -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 | } |
@@ -27,7 +27,9 @@ |
||
| 27 | 27 | use Quantum\Exceptions\BaseException; |
| 28 | 28 | use ReflectionException; |
| 29 | 29 | |
| 30 | -if (!defined('DS')) define('DS', DIRECTORY_SEPARATOR); |
|
| 30 | +if (!defined('DS')) { |
|
| 31 | + define('DS', DIRECTORY_SEPARATOR); |
|
| 32 | +} |
|
| 31 | 33 | |
| 32 | 34 | /** |
| 33 | 35 | * Class ConsoleAppAdapter |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | ]; |
| 112 | 112 | |
| 113 | 113 | if (is_array($value)) { |
| 114 | - return array_map(function ($v) use ($escapeMap) { |
|
| 114 | + return array_map(function($v) use ($escapeMap) { |
|
| 115 | 115 | return is_string($v) ? strtr($v, $escapeMap) : $v; |
| 116 | 116 | }, $value); |
| 117 | 117 | } |
@@ -136,6 +136,6 @@ |
||
| 136 | 136 | */ |
| 137 | 137 | private static function createJwtInstance(string $adapter): ?JwtToken |
| 138 | 138 | { |
| 139 | - return $adapter === Auth::JWT ? (new JwtToken())->setLeeway(1)->setClaims((array)config()->get('auth.claims')) : null; |
|
| 139 | + return $adapter === Auth::JWT ? (new JwtToken())->setLeeway(1)->setClaims((array) config()->get('auth.claims')) : null; |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | \ No newline at end of file |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function get(): array |
| 32 | 32 | { |
| 33 | - return array_map(function ($element) { |
|
| 33 | + return array_map(function($element) { |
|
| 34 | 34 | $item = clone $this; |
| 35 | 35 | $item->updateOrmModel($element); |
| 36 | 36 | return $item; |