Passed
Push — master ( 7c1ce7...b66608 )
by Arthur
08:59 queued 11s
created
src/Helpers/Classes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         $ref = new \ReflectionClass($class);
17 17
 
18
-        return (string) $ref->getShortName();
18
+        return (string)$ref->getShortName();
19 19
     }
20 20
 
21 21
     /**
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $ref = new \ReflectionClass($object);
29 29
 
30
-        return (string) $ref->getShortName();
30
+        return (string)$ref->getShortName();
31 31
     }
32 32
 
33 33
     /**
Please login to merge, or discard this patch.
src/Types/DefaultInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
     public const PREFIX_KEY = 'prefix';
13 13
 
14 14
     // console colors
15
-    public const ANSI_COLOR_RED    =  "\x1b[31m";
16
-    public const ANSI_COLOR_GREEN  =  "\x1b[32m";
15
+    public const ANSI_COLOR_RED    = "\x1b[31m";
16
+    public const ANSI_COLOR_GREEN  = "\x1b[32m";
17 17
     public const ANSI_COLOR_YELLOW = "\x1b[33m";
18 18
     public const ANSI_COLOR_RESET  = "\x1b[0m";
19 19
 
Please login to merge, or discard this patch.
src/Blocks/Module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         exec(CommandsInterface::LARAVEL_MODULE_MAKE . PhpInterface::SPACE . $this->generator->version, $output);
36 36
         exec(CommandsInterface::LARAVEL_MODULE_USE . PhpInterface::SPACE . $this->generator->version, $output);
37 37
         exec(CommandsInterface::LARAVEL_MODULE_LIST, $output);
38
-        foreach($output as $str)
38
+        foreach ($output as $str)
39 39
         {
40 40
             Console::out($str, Console::COLOR_GREEN);
41 41
         }
Please login to merge, or discard this patch.
src/Blocks/FormRequestModel.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,19 +34,19 @@  discard block
 block discarded – undo
34 34
     {
35 35
         $attrCnt =
36 36
             count($this->generator->types[$this->generator->objectProps[ApiInterface::RAML_ATTRS]][ApiInterface::RAML_PROPS]);
37
-        foreach($this->generator->types[$this->generator->objectProps[ApiInterface::RAML_ATTRS]]
37
+        foreach ($this->generator->types[$this->generator->objectProps[ApiInterface::RAML_ATTRS]]
38 38
                 [ApiInterface::RAML_PROPS] as $attrKey => $attrVal)
39 39
         {
40 40
             --$attrCnt;
41 41
             // determine attr
42
-            if(is_array($attrVal))
42
+            if (is_array($attrVal))
43 43
             {
44 44
                 $this->setDescription($attrVal);
45 45
                 $this->openRule($attrKey);
46 46
                 $cnt = count($attrVal);
47 47
                 $this->setFilters($attrVal, $cnt);
48 48
                 $this->closeRule();
49
-                if($attrCnt > 0)
49
+                if ($attrCnt > 0)
50 50
                 {
51 51
                     $this->sourceCode .= PHP_EOL;
52 52
                 }
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
      */
61 61
     private function setFilters(array $attrVal, int $cnt)
62 62
     {
63
-        foreach($attrVal as $k => $v)
63
+        foreach ($attrVal as $k => $v)
64 64
         {
65 65
             --$cnt;
66
-            if($k === ApiInterface::RAML_KEY_REQUIRED && (bool)$v === false)
66
+            if ($k === ApiInterface::RAML_KEY_REQUIRED && (bool)$v === false)
67 67
             {
68 68
                 continue;
69 69
             }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             $this->setEnum($k, $v);
73 73
             $this->setPattern($k, $v);
74 74
             $this->setMinMax($k, $v);
75
-            if($cnt > 0 && in_array($k, $this->excludedKeys) === false)
75
+            if ($cnt > 0 && in_array($k, $this->excludedKeys) === false)
76 76
             {
77 77
                 $this->sourceCode .= PhpInterface::PIPE;
78 78
             }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     private function setRequired(string $k, $v)
87 87
     {
88
-        if($k === ApiInterface::RAML_KEY_REQUIRED && (bool)$v === true)
88
+        if ($k === ApiInterface::RAML_KEY_REQUIRED && (bool)$v === true)
89 89
         {
90 90
             $this->sourceCode .= ApiInterface::RAML_KEY_REQUIRED;
91 91
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     private function setPattern(string $k, $v)
99 99
     {
100
-        if($k === ApiInterface::RAML_PATTERN)
100
+        if ($k === ApiInterface::RAML_PATTERN)
101 101
         {
102 102
             $this->sourceCode .= ModelsInterface::LARAVEL_FILTER_REGEX . PhpInterface::COLON . $v;
103 103
         }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     private function setEnum(string $k, $v)
111 111
     {
112
-        if($k === ApiInterface::RAML_ENUM)
112
+        if ($k === ApiInterface::RAML_ENUM)
113 113
         {
114 114
             $this->sourceCode .= ModelsInterface::LARAVEL_FILTER_ENUM . PhpInterface::COLON . implode(PhpInterface::COMMA, $v);
115 115
         }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     private function setType(string $k, $v)
123 123
     {
124
-        if($k === ApiInterface::RAML_TYPE && in_array($v, $this->legalTypes))
124
+        if ($k === ApiInterface::RAML_TYPE && in_array($v, $this->legalTypes))
125 125
         {
126 126
             $this->sourceCode .= $v;
127 127
         }
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
      */
134 134
     private function setMinMax(string $k, $v)
135 135
     {
136
-        if($k === ApiInterface::RAML_STRING_MIN || $k === ApiInterface::RAML_INTEGER_MIN)
136
+        if ($k === ApiInterface::RAML_STRING_MIN || $k === ApiInterface::RAML_INTEGER_MIN)
137 137
         {
138 138
             $this->sourceCode .= ModelsInterface::LARAVEL_FILTER_MIN . PhpInterface::COLON . $v;
139 139
         }
140
-        else if($k === ApiInterface::RAML_STRING_MAX || $k === ApiInterface::RAML_INTEGER_MAX)
140
+        else if ($k === ApiInterface::RAML_STRING_MAX || $k === ApiInterface::RAML_INTEGER_MAX)
141 141
         {
142 142
             $this->sourceCode .= ModelsInterface::LARAVEL_FILTER_MAX . PhpInterface::COLON . $v;
143 143
         }
Please login to merge, or discard this patch.
src/Blocks/ConfigTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
     private function openCache(string $entity): void
104 104
     {
105 105
         $this->openEntity(strtolower($entity), 2);
106
-        $this->setParam(ConfigInterface::ENABLED,  ApiInterface::RAML_TYPE_BOOLEAN,PhpInterface::PHP_TYPES_BOOL_TRUE, 3);
106
+        $this->setParam(ConfigInterface::ENABLED, ApiInterface::RAML_TYPE_BOOLEAN, PhpInterface::PHP_TYPES_BOOL_TRUE, 3);
107 107
     }
108 108
 
109 109
     /**
Please login to merge, or discard this patch.
src/Extension/BitMask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     public function getFlags()
46 46
     {
47
-        if(empty($this->entity[$this->field][ConfigInterface::FLAGS])) {
47
+        if (empty($this->entity[$this->field][ConfigInterface::FLAGS])) {
48 48
             throw new AttributesException(ErrorsInterface::JSON_API_ERRORS[ErrorsInterface::HTTP_CODE_FSM_FLAGS], ErrorsInterface::HTTP_CODE_FSM_FLAGS);
49 49
         }
50 50
         return $this->entity[$this->field][ConfigInterface::FLAGS];
Please login to merge, or discard this patch.
src/Extension/StateMachine.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function setStates(string $field) : void
68 68
     {
69
-        if(empty($this->machine[$field][ConfigInterface::STATES])) {
69
+        if (empty($this->machine[$field][ConfigInterface::STATES])) {
70 70
             throw new AttributesException(ErrorsInterface::JSON_API_ERRORS[ErrorsInterface::HTTP_CODE_BULK_EXT_ERROR], ErrorsInterface::HTTP_CODE_BULK_EXT_ERROR);
71 71
         }
72 72
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function setInitial(string $field) : void
81 81
     {
82
-        if(empty($this->machine[$field][ConfigInterface::STATES][ConfigInterface::INITIAL][0])) {
82
+        if (empty($this->machine[$field][ConfigInterface::STATES][ConfigInterface::INITIAL][0])) {
83 83
             throw new AttributesException('There should be an initial value for: "' . $field . '" field."', ErrorsInterface::HTTP_CODE_FSM_INIT_ATTR);
84 84
         }
85 85
 
Please login to merge, or discard this patch.
src/Extension/JWTTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     protected function createJwtUser()
21 21
     {
22
-        if(empty($this->model->password)) {
22
+        if (empty($this->model->password)) {
23 23
             Json::outputErrors(
24 24
                 [
25 25
                     [
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     private function updateJwtUser(&$model, $jsonApiAttributes)
48 48
     {
49
-        if(password_verify($jsonApiAttributes[JwtInterface::PASSWORD], $model->password) === false) {
49
+        if (password_verify($jsonApiAttributes[JwtInterface::PASSWORD], $model->password) === false) {
50 50
             Json::outputErrors(
51 51
                 [
52 52
                     [
Please login to merge, or discard this patch.
src/Controllers/HistoryTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -351,10 +351,10 @@
 block discarded – undo
351 351
                     $this->historyTypes = $dataHistory[ApiInterface::API_COMPONENTS][ApiInterface::API_SCHEMAS];
352 352
                     $this->types += array_merge_recursive($this->historyTypes, $this->currentTypes);
353 353
 
354
-                    $attrsCurrent += array_filter($this->currentTypes, function ($k) {
354
+                    $attrsCurrent += array_filter($this->currentTypes, function($k) {
355 355
                         return strpos($k, CustomsInterface::CUSTOM_TYPES_ATTRIBUTES) !== false;
356 356
                     }, ARRAY_FILTER_USE_KEY);
357
-                    $attrsHistory += array_filter($this->historyTypes, function ($k) {
357
+                    $attrsHistory += array_filter($this->historyTypes, function($k) {
358 358
                         return strpos($k, CustomsInterface::CUSTOM_TYPES_ATTRIBUTES) !== false;
359 359
                     }, ARRAY_FILTER_USE_KEY);
360 360
                 }
Please login to merge, or discard this patch.