Completed
Pull Request — master (#2051)
by
unknown
05:31
created
src/Controllers/MenuController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function index()
26 26
     {
27
-        return Admin::content(function (Content $content) {
27
+        return Admin::content(function(Content $content) {
28 28
             $content->header(trans('admin.menu'));
29 29
             $content->description(trans('admin.list'));
30 30
 
31
-            $content->row(function (Row $row) {
31
+            $content->row(function(Row $row) {
32 32
                 $row->column(6, $this->treeView()->render());
33 33
 
34
-                $row->column(6, function (Column $column) {
34
+                $row->column(6, function(Column $column) {
35 35
                     $form = new \Encore\Admin\Widgets\Form();
36 36
                     $form->action(url(admin_base_path('auth/menu')));
37 37
 
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function treeView()
67 67
     {
68
-        return Menu::tree(function (Tree $tree) {
68
+        return Menu::tree(function(Tree $tree) {
69 69
             $tree->disableCreate();
70 70
 
71
-            $tree->branch(function ($branch) {
71
+            $tree->branch(function($branch) {
72 72
                 $payload = "<i class='fa {$branch['icon']}'></i>&nbsp;<strong>{$branch['title']}</strong>";
73 73
 
74 74
                 if (!isset($branch['children'])) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function edit($id)
97 97
     {
98
-        return Admin::content(function (Content $content) use ($id) {
98
+        return Admin::content(function(Content $content) use ($id) {
99 99
             $content->header(trans('admin.menu'));
100 100
             $content->description(trans('admin.edit'));
101 101
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public function form()
112 112
     {
113
-        return Menu::form(function (Form $form) {
113
+        return Menu::form(function(Form $form) {
114 114
             $form->display('id', 'ID');
115 115
 
116 116
             $form->select('parent_id', trans('admin.parent_id'))->options(Menu::selectOptions());
Please login to merge, or discard this patch.
src/Grid/Displayers/Select.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
         $name = $this->column->getName();
12 12
 
13 13
         $class = "grid-select-{$name}";
14
-        $resource_url= url($this->grid->resource());
14
+        $resource_url = url($this->grid->resource());
15 15
         $script = <<<EOT
16 16
 
17 17
 $('.$class').select2().on('change', function(){
Please login to merge, or discard this patch.
src/Grid/Displayers/SwitchDisplay.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         $name = $this->column->getName();
26 26
 
27 27
         $class = "grid-switch-{$name}";
28
-        $resource_url= url($this->grid->resource());
28
+        $resource_url = url($this->grid->resource());
29 29
         $script = <<<EOT
30 30
 
31 31
 $('.$class').bootstrapSwitch({
Please login to merge, or discard this patch.
src/Grid/Tools/CreateButton.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         }
29 29
 
30 30
         $new = trans('admin.new');
31
-        $resource_url= url($this->grid->resource());
31
+        $resource_url = url($this->grid->resource());
32 32
         return <<<EOT
33 33
 
34 34
 <div class="btn-group pull-right" style="margin-right: 10px">
Please login to merge, or discard this patch.
src/Form/Field/Select.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         } else {
108 108
             $class = $field;
109 109
         }
110
-        $sourceUrl= url($sourceUrl);
110
+        $sourceUrl = url($sourceUrl);
111 111
         $script = <<<EOT
112 112
 $(document).off('change', "{$this->getElementClassSelector()}");
113 113
 $(document).on('change', "{$this->getElementClassSelector()}", function () {
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
     public function loads($fields = [], $sourceUrls = [], $idField = 'id', $textField = 'text')
144 144
     {
145 145
         $fieldsStr = implode('.', $fields);
146
-        foreach($sourceUrls as &$item){
147
-            $item= url($item);
146
+        foreach ($sourceUrls as &$item) {
147
+            $item = url($item);
148 148
         }
149 149
         $urlsStr = implode('^', $sourceUrls);
150 150
         $script = <<<EOT
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      */
197 197
     protected function loadRemoteOptions($url, $parameters = [], $options = [])
198 198
     {
199
-        $url= url($url);
199
+        $url = url($url);
200 200
         $ajaxOptions = [
201 201
             'url' => $url.'?'.http_build_query($parameters),
202 202
         ];
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     public function ajax($url, $idField = 'id', $textField = 'text')
227 227
     {
228
-        $url= url($url);
228
+        $url = url($url);
229 229
         $this->script = <<<EOT
230 230
 
231 231
 $("{$this->getElementClassSelector()}").select2({
Please login to merge, or discard this patch.
src/Grid/Displayers/SwitchGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     protected function buildSwitch($name, $label = '')
42 42
     {
43 43
         $class = "grid-switch-{$name}";
44
-        $resource_url= url($this->grid->resource());
44
+        $resource_url = url($this->grid->resource());
45 45
 
46 46
         $script = <<<EOT
47 47
 
Please login to merge, or discard this patch.