Completed
Pull Request — master (#441)
by Lloric Mayuga
02:34 queued 43s
created
config/apidoc.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -17,19 +17,19 @@
 block discarded – undo
17 17
      */
18 18
     'postman' => true,
19 19
     
20
-     /**
21
-     * Fractal Transformer Config
22
-     * 
23
-     * must install
24
-     * composer require league/fractal
25
-     *
26
-     * Available serializers:
27
-     * -League\Fractal\Serializer\ArraySerializer::class
28
-     * -League\Fractal\Serializer\DataArraySerializer::class
29
-     * -League\Fractal\Serializer\JsonApiSerializer::class
30
-     *
31
-     * null means no serializer
32
-     */
20
+        /**
21
+         * Fractal Transformer Config
22
+         * 
23
+         * must install
24
+         * composer require league/fractal
25
+         *
26
+         * Available serializers:
27
+         * -League\Fractal\Serializer\ArraySerializer::class
28
+         * -League\Fractal\Serializer\DataArraySerializer::class
29
+         * -League\Fractal\Serializer\JsonApiSerializer::class
30
+         *
31
+         * null means no serializer
32
+         */
33 33
     'fractal' => [
34 34
         'serializer' => null,
35 35
     ],
Please login to merge, or discard this patch.
src/Tools/ResponseStrategies/TransformerTagsStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
             $fractal = new Manager();
49 49
             
50
-            if(!is_null(config('apidoc.fractal.serializer'))) {
50
+            if (!is_null(config('apidoc.fractal.serializer'))) {
51 51
                 $fractal->setSerializer(app(config('apidoc.fractal.serializer')));
52 52
             }
53 53
             
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     private function getClassToBeTransformed(array $tags, ReflectionMethod $transformerMethod)
81 81
     {
82
-        $modelTag = array_first(array_filter($tags, function ($tag) {
82
+        $modelTag = array_first(array_filter($tags, function($tag) {
83 83
             return ($tag instanceof Tag) && strtolower($tag->getName()) == 'transformermodel';
84 84
         }));
85 85
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $type = $modelTag->getContent();
89 89
         } else {
90 90
             $parameter = array_first($transformerMethod->getParameters());
91
-            if ($parameter->hasType() && ! $parameter->getType()->isBuiltin() && class_exists((string) $parameter->getType())) {
91
+            if ($parameter->hasType() && !$parameter->getType()->isBuiltin() && class_exists((string) $parameter->getType())) {
92 92
                 // ladies and gentlemen, we have a type!
93 93
                 $type = (string) $parameter->getType();
94 94
             }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     private function getTransformerTag(array $tags)
134 134
     {
135 135
         $transFormerTags = array_values(
136
-            array_filter($tags, function ($tag) {
136
+            array_filter($tags, function($tag) {
137 137
                 return ($tag instanceof Tag) && in_array(strtolower($tag->getName()), ['transformer', 'transformercollection']);
138 138
             })
139 139
         );
Please login to merge, or discard this patch.