Completed
Push — master ( 1bc61b...89ca89 )
by Maxime
16s
created
src/Distilleries/DatatableBuilder/Console/DatatableMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,6 +134,6 @@
 block discarded – undo
134 134
      */
135 135
     protected function getStub()
136 136
     {
137
-        return __DIR__ . '/Lib/stubs/datatable-class-template.stub';
137
+        return __DIR__.'/Lib/stubs/datatable-class-template.stub';
138 138
     }
139 139
 }
Please login to merge, or discard this patch.
Distilleries/DatatableBuilder/Console/Lib/Generators/DatatableGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             "            ->add('",
22 22
             $field,
23 23
             "', null",
24
-            ", trans('datatable." . strtolower($field) . "')",
24
+            ", trans('datatable.".strtolower($field)."')",
25 25
             ")",
26 26
             ($isLast) ? "" : "\n"
27 27
         ];
Please login to merge, or discard this patch.
src/Distilleries/DatatableBuilder/EloquentDatatable.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
     /**
115 115
      * Generate specified columns for current datatable.
116 116
      *
117
-     * @return mixed
117
+     * @return \Illuminate\Http\JsonResponse
118 118
      */
119 119
     public function generateColomns()
120 120
     {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function add($name, $closure = null, $translation = '')
87 87
     {
88
-        if (! empty($closure)) {
88
+        if (!empty($closure)) {
89 89
             $this->colomns[] = [
90 90
                 $name,
91 91
                 $closure,
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function addTranslation($name, $translation)
110 110
     {
111
-        $this->colomnsDisplay[] = ! empty($translation) ? $translation : ucfirst($name);
111
+        $this->colomnsDisplay[] = !empty($translation) ? $translation : ucfirst($name);
112 112
     }
113 113
 
114 114
     /**
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $colSearchAndSort = [];
125 125
         $sortOnly = [];
126 126
 
127
-        if (! empty($this->colomns)) {
127
+        if (!empty($this->colomns)) {
128 128
             foreach ($this->colomns as $key => $value) {
129 129
 
130 130
                 if (is_string($value)) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public function setClassRow($datatable)
156 156
     {
157
-        $datatable->setRowClass(function ($row) {
157
+        $datatable->setRowClass(function($row) {
158 158
             return (isset($row->status) && empty($row->status)) ? 'danger' : '';
159 159
         });
160 160
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             'colomns_display' => $this->colomnsDisplay,
175 175
             'datatable_options' => $this->addOptions(),
176 176
             'id' => strtolower(str_replace('\\', '_', get_class($this))),
177
-            'route' => ! empty($route) ? $route : $this->getControllerNameForAction() . '@getDatatable',
177
+            'route' => !empty($route) ? $route : $this->getControllerNameForAction().'@getDatatable',
178 178
             'filters' => $this->addFilter(),
179 179
         ]);
180 180
     }
@@ -190,10 +190,10 @@  discard block
 block discarded – undo
190 190
     {
191 191
         $reflection = new ReflectionClass(get_class($this));
192 192
 
193
-        $this->add('actions', function ($model) use ($template, $reflection, $route) {
193
+        $this->add('actions', function($model) use ($template, $reflection, $route) {
194 194
             return view($template, [
195 195
                 'data' => $model->toArray(),
196
-                'route' => ! empty($route) ? $route . '@' : $this->getControllerNameForAction() . '@',
196
+                'route' => !empty($route) ? $route.'@' : $this->getControllerNameForAction().'@',
197 197
             ])->render();
198 198
         });
199 199
     }
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     protected function addOptions()
227 227
     {
228
-        if (! array_key_exists('order', $this->datatableOptions) && ! empty($this->defaultOrder)) {
228
+        if (!array_key_exists('order', $this->datatableOptions) && !empty($this->defaultOrder)) {
229 229
             if (is_array($this->defaultOrder)) {
230 230
                 foreach ($this->defaultOrder as $keyOrder => $order) {
231 231
                     if (is_string($order[0])) {
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     {
259 259
         $action = explode('@', Route::currentRouteAction());
260 260
 
261
-        return '\\' . $action[0];
261
+        return '\\'.$action[0];
262 262
     }
263 263
 
264 264
     /**
Please login to merge, or discard this patch.