Completed
Pull Request — master (#376)
by
unknown
01:48
created
src/Tools/ResponseStrategies/TransformerTagsStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     protected function getTransformerResponse(array $tags)
31 31
     {
32 32
         try {
33
-            if(empty($transformerTag = $this->getTransformerTag($tags))) {
33
+            if (empty($transformerTag = $this->getTransformerTag($tags))) {
34 34
                 return;
35 35
             }
36 36
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     private function getClassToBeTransformed(array $tags, ReflectionMethod $transformerMethod)
69 69
     {
70
-        $modelTag = array_first(array_filter($tags, function ($tag) {
70
+        $modelTag = array_first(array_filter($tags, function($tag) {
71 71
             return ($tag instanceof Tag) && strtolower($tag->getName()) == 'transformermodel';
72 72
         }));
73 73
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             $type = $modelTag->getContent();
77 77
         } else {
78 78
             $parameter = array_first($transformerMethod->getParameters());
79
-            if ($parameter->hasType() && ! $parameter->getType()->isBuiltin() && class_exists((string) $parameter->getType())) {
79
+            if ($parameter->hasType() && !$parameter->getType()->isBuiltin() && class_exists((string) $parameter->getType())) {
80 80
                 // ladies and gentlemen, we have a type!
81 81
                 $type = (string) $parameter->getType();
82 82
             }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     private function getTransformerTag(array $tags)
123 123
     {
124
-        $transFormerTags = array_filter($tags, function ($tag) {
124
+        $transFormerTags = array_filter($tags, function($tag) {
125 125
             return ($tag instanceof Tag) && in_array(strtolower($tag->getName()), ['transformer', 'transformercollection']);
126 126
         });
127 127
 
Please login to merge, or discard this patch.
src/Tools/ResponseStrategies/ResponseTagStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     protected function getDocBlockResponse(array $tags)
26 26
     {
27
-        $responseTags = array_filter($tags, function ($tag) {
27
+        $responseTags = array_filter($tags, function($tag) {
28 28
             return $tag instanceof Tag && strtolower($tag->getName()) == 'response';
29 29
         });
30 30
         if (empty($responseTags)) {
Please login to merge, or discard this patch.