Completed
Pull Request — master (#155)
by Tomas
13:17
created
src/Component/ApiListingControl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Params/GetInputParam.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Params/PostInputParam.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Params/InputParam.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
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()) {
Please login to merge, or discard this patch.
src/Params/CookieInputParam.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Misc/IpDetector.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
      */
10 10
     public function getRequestIp(): string
11 11
     {
12
-        if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
12
+        if ( ! empty($_SERVER['HTTP_CLIENT_IP'])) {
13 13
             $ip = $_SERVER['HTTP_CLIENT_IP'];
14
-        } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] !== '127.0.0.1') {
14
+        } elseif ( ! empty($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] !== '127.0.0.1') {
15 15
             $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
16
-        } elseif (!empty($_SERVER['REMOTE_ADDR'])) {
16
+        } elseif ( ! empty($_SERVER['REMOTE_ADDR'])) {
17 17
             $ip = $_SERVER['REMOTE_ADDR'];
18 18
         } else {
19 19
             $ip = 'cli';
Please login to merge, or discard this patch.
src/Params/ParamsProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@
 block discarded – undo
21 21
     {
22 22
         foreach ($this->params as $param) {
23 23
             $validationResult = $param->validate();
24
-            if (!$validationResult->isOk()) {
24
+            if ( ! $validationResult->isOk()) {
25 25
                 $this->errors[$param->getKey()] = $validationResult->getErrors();
26 26
             }
27 27
         }
28
-        return !empty($this->errors);
28
+        return ! empty($this->errors);
29 29
     }
30 30
 
31 31
     public function getErrors(): array
Please login to merge, or discard this patch.
src/Output/JsonOutput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
     public function validate(ResponseInterface $response): ValidationResultInterface
27 27
     {
28
-        if (!$response instanceof JsonApiResponse) {
28
+        if ( ! $response instanceof JsonApiResponse) {
29 29
             return new ValidationResult(ValidationResult::STATUS_ERROR);
30 30
         }
31 31
         if ($this->code !== $response->getCode()) {
Please login to merge, or discard this patch.
src/Output/RedirectOutput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 {
12 12
     public function validate(ResponseInterface $response): ValidationResultInterface
13 13
     {
14
-        if (!$response instanceof RedirectResponse) {
14
+        if ( ! $response instanceof RedirectResponse) {
15 15
             return new ValidationResult(ValidationResult::STATUS_ERROR);
16 16
         }
17 17
         if ($this->code !== $response->getCode()) {
Please login to merge, or discard this patch.