Completed
Branch master (9c6be3)
by Lasse
06:29
created
src/Commands/TransformerMakeCommand.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     /**
88 88
      * Get columns types for the models table and if type casting is needed
89 89
      * @param  mixed $model
90
-     * @return Illuminate\Support\Collection
90
+     * @return Collection
91 91
      */
92 92
     public function getColumnTypes($model)
93 93
     {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     /**
125 125
      * Get the relationships for the given model
126 126
      * @param  mixed $model
127
-     * @return Illuminate\Support\Collection
127
+     * @return Collection
128 128
      */
129 129
     public function getRelationships($model)
130 130
     {
Please login to merge, or discard this patch.
src/CybertronServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function register()
25 25
     {
26
-        $this->app->singleton('command.cybertron.make.transformer', function ($app) {
26
+        $this->app->singleton('command.cybertron.make.transformer', function($app) {
27 27
             return $app['lasselehtinen\Cybertron\Commands\TransformerMakeCommand'];
28 28
         });
29 29
 
Please login to merge, or discard this patch.
src/Views/transformer.blade.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,10 +13,11 @@  discard block
 block discarded – undo
13 13
      * @var array
14 14
      */
15 15
     protected $defaultIncludes = [
16
-@foreach ($relationships as $relationship)
16
+@foreach ($relationships as $relationship) {
17 17
         '{{ $relationship['method'] }}',
18 18
 @endforeach
19 19
     ];
20
+}
20 21
 
21 22
     /**
22 23
      * Transform {{ $name }}
@@ -27,13 +28,14 @@  discard block
 block discarded – undo
27 28
     public function transform({{ $name }} ${{ camel_case($name) }})
28 29
     {
29 30
         return [
30
-@foreach ($columnTypes as $columnType)
31
+@foreach ($columnTypes as $columnType) {
31 32
             '{{ $columnType['name'] }}' =>@if ($columnType['cast'] === true) ({{ $columnType['type'] }})@endif ${{ camel_case($name) }}->{{ $columnType['name'] }},
32 33
 @endforeach
33 34
         ];
35
+}
34 36
     }
35 37
 
36
-@foreach ($relationships as $relationship)
38
+@foreach ($relationships as $relationship) {
37 39
     /**
38 40
      * Include {{ ucfirst($relationship['method']) }}
39 41
      *
@@ -43,6 +45,7 @@  discard block
 block discarded – undo
43 45
     public function include{{ ucfirst($relationship['method']) }}({{ $name }} ${{ camel_case($name) }})
44 46
     {
45 47
         return $this->{{ $relationship['relationCountType'] }}(${{ camel_case($name) }}->{{ $relationship['method'] }}, new {{ $relationship['relatedClass']}}Transformer);
48
+}
46 49
     }
47 50
 
48 51
 @endforeach
Please login to merge, or discard this patch.