Completed
Push — master ( a954cd...52657a )
by Marcel
06:14 queued 03:56
created
src/Mpociot/ApiDoc/Generators/LaravelGenerator.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 $response = $docblockResponse;
68 68
                 $showresponse = true;
69 69
             }
70
-            if (! $response) {
70
+            if (!$response) {
71 71
                 $transformerResponse = $this->getTransformerResponse($routeDescription['tags']);
72 72
                 if ($transformerResponse) {
73 73
                     // we have a transformer response from the docblock ( @transformer || @transformercollection )
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                     $showresponse = true;
76 76
                 }
77 77
             }
78
-            if (! $response) {
78
+            if (!$response) {
79 79
                 $response = $this->getRouteResponse($route, $bindings, $headers);
80 80
             }
81 81
             if ($response->headers->get('Content-Type') === 'application/json') {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         }
87 87
 
88 88
         return $this->getParameters([
89
-            'id' => md5($this->getUri($route).':'.implode($this->getMethods($route))),
89
+            'id' => md5($this->getUri($route) . ':' . implode($this->getMethods($route))),
90 90
             'resource' => $routeGroup,
91 91
             'title' => $routeDescription['short'],
92 92
             'description' => $routeDescription['long'],
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function prepareMiddleware($enable = true)
109 109
     {
110
-        App::instance('middleware.disable', ! $enable);
110
+        App::instance('middleware.disable', !$enable);
111 111
     }
112 112
 
113 113
     /**
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
     protected function getTransformerResponse($tags)
154 154
     {
155 155
         try {
156
-            $transFormerTags = array_filter($tags, function ($tag) {
157
-                if (! ($tag instanceof Tag)) {
156
+            $transFormerTags = array_filter($tags, function($tag) {
157
+                if (!($tag instanceof Tag)) {
158 158
                     return false;
159 159
                 }
160 160
 
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
                 return false;
166 166
             }
167 167
 
168
-            $modelTag = array_first(array_filter($tags, function ($tag) {
169
-                if (! ($tag instanceof Tag)) {
168
+            $modelTag = array_first(array_filter($tags, function($tag) {
169
+                if (!($tag instanceof Tag)) {
170 170
                     return false;
171 171
                 }
172 172
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             }));
175 175
             $tag = \array_first($transFormerTags);
176 176
             $transformer = $tag->getContent();
177
-            if (! \class_exists($transformer)) {
177
+            if (!\class_exists($transformer)) {
178 178
                 // if we can't find the transformer we can't generate a response
179 179
                 return;
180 180
             }
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             if (version_compare(PHP_VERSION, '7.0.0') >= 0 && \is_null($type)) {
191 191
                 // we can only get the type with reflection for PHP 7
192 192
                 if ($parameter->hasType() &&
193
-                ! $parameter->getType()->isBuiltin() &&
193
+                !$parameter->getType()->isBuiltin() &&
194 194
                 \class_exists((string) $parameter->getType())) {
195 195
                     //we have a type
196 196
                     $type = (string) $parameter->getType();
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 
251 251
         foreach ($reflectionMethod->getParameters() as $parameter) {
252 252
             $parameterType = $parameter->getClass();
253
-            if (! is_null($parameterType) && class_exists($parameterType->name)) {
253
+            if (!is_null($parameterType) && class_exists($parameterType->name)) {
254 254
                 $className = $parameterType->name;
255 255
 
256 256
                 if (is_subclass_of($className, FormRequest::class)) {
Please login to merge, or discard this patch.