@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | public function enableGlobalPreflight(ApiHandlerInterface $corsHandler = null) |
48 | 48 | { |
49 | - if (!$corsHandler) { |
|
49 | + if ( ! $corsHandler) { |
|
50 | 50 | $corsHandler = new CorsPreflightHandler(new Response()); |
51 | 51 | } |
52 | 52 | $this->globalPreflightHandler = $corsHandler; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $versionHandlers = []; |
41 | 41 | foreach ($handlers as $handler) { |
42 | 42 | $endPoint = $handler->getEndpoint(); |
43 | - if (!isset($versionHandlers[$endPoint->getVersion()])) { |
|
43 | + if ( ! isset($versionHandlers[$endPoint->getVersion()])) { |
|
44 | 44 | $versionHandlers[$endPoint->getVersion()] = []; |
45 | 45 | } |
46 | 46 | $versionHandlers[$endPoint->getVersion()][] = $handler; |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | private function checkAuth(ApiAuthorizationInterface $authorization): bool |
116 | 116 | { |
117 | - if (!$authorization->authorized()) { |
|
117 | + if ( ! $authorization->authorized()) { |
|
118 | 118 | $this->getHttpResponse()->setCode(Response::S403_FORBIDDEN); |
119 | 119 | $this->sendResponse(new JsonResponse(['status' => 'error', 'message' => $authorization->getErrorMessage()])); |
120 | 120 | return false; |
@@ -189,11 +189,11 @@ discard block |
||
189 | 189 | |
190 | 190 | private function getRequestDomain(): ?string |
191 | 191 | { |
192 | - if (!filter_input(INPUT_SERVER, 'HTTP_REFERER')) { |
|
192 | + if ( ! filter_input(INPUT_SERVER, 'HTTP_REFERER')) { |
|
193 | 193 | return null; |
194 | 194 | } |
195 | 195 | $refererParsedUrl = parse_url(filter_input(INPUT_SERVER, 'HTTP_REFERER')); |
196 | - if (!(isset($refererParsedUrl['scheme']) && isset($refererParsedUrl['host']))) { |
|
196 | + if ( ! (isset($refererParsedUrl['scheme']) && isset($refererParsedUrl['host']))) { |
|
197 | 197 | return null; |
198 | 198 | } |
199 | 199 | $url = $refererParsedUrl['scheme'] . '://' . $refererParsedUrl['host']; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | public function getValue() |
10 | 10 | { |
11 | - if (!filter_has_var(INPUT_GET, $this->key) && isset($_GET[$this->key])) { |
|
11 | + if ( ! filter_has_var(INPUT_GET, $this->key) && isset($_GET[$this->key])) { |
|
12 | 12 | return $_GET[$this->key]; |
13 | 13 | } |
14 | 14 | $value = $this->isMulti() ? filter_input(INPUT_GET, $this->key, FILTER_DEFAULT, FILTER_REQUIRE_ARRAY) : filter_input(INPUT_GET, $this->key); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | public function getValue() |
10 | 10 | { |
11 | - if (!filter_has_var(INPUT_POST, $this->key) && isset($_POST[$this->key])) { |
|
11 | + if ( ! filter_has_var(INPUT_POST, $this->key) && isset($_POST[$this->key])) { |
|
12 | 12 | return $_POST[$this->key]; |
13 | 13 | } |
14 | 14 | $value = $this->isMulti() ? filter_input(INPUT_POST, $this->key, FILTER_DEFAULT, FILTER_REQUIRE_ARRAY) : filter_input(INPUT_POST, $this->key); |
@@ -20,11 +20,11 @@ |
||
20 | 20 | public function isError(): bool |
21 | 21 | { |
22 | 22 | foreach ($this->params as $param) { |
23 | - if (!$param->isValid()) { |
|
23 | + if ( ! $param->isValid()) { |
|
24 | 24 | $this->errors[$param->getKey()] = $param->getErrors(); |
25 | 25 | } |
26 | 26 | } |
27 | - return !empty($this->errors); |
|
27 | + return ! empty($this->errors); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function getErrors(): array |
@@ -41,7 +41,7 @@ |
||
41 | 41 | return false; |
42 | 42 | } |
43 | 43 | |
44 | - if (!$value && $this->isRequired() === self::OPTIONAL) { |
|
44 | + if ( ! $value && $this->isRequired() === self::OPTIONAL) { |
|
45 | 45 | return true; |
46 | 46 | } |
47 | 47 |
@@ -143,7 +143,7 @@ |
||
143 | 143 | |
144 | 144 | public function updateConsoleForm(Form $form): void |
145 | 145 | { |
146 | - $count = $this->isMulti() ? 5 : 1; // TODO moznost nastavit kolko inputov sa ma vygenerovat v konzole, default moze byt 5 |
|
146 | + $count = $this->isMulti() ? 5 : 1; // TODO moznost nastavit kolko inputov sa ma vygenerovat v konzole, default moze byt 5 |
|
147 | 147 | for ($i = 0; $i < $count; $i++) { |
148 | 148 | $key = $this->getKey(); |
149 | 149 | if ($this->isMulti()) { |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | public function getValue() |
10 | 10 | { |
11 | - if (!filter_has_var(INPUT_COOKIE, $this->key) && isset($_COOKIE[$this->key])) { |
|
11 | + if ( ! filter_has_var(INPUT_COOKIE, $this->key) && isset($_COOKIE[$this->key])) { |
|
12 | 12 | return $_COOKIE[$this->key]; |
13 | 13 | } |
14 | 14 | $value = filter_input(INPUT_COOKIE, $this->key); |