We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | public function enableTabs() |
8 | 8 | { |
9 | 9 | $this->setOperationSetting('tabsEnabled', true); |
10 | - $this->setOperationSetting('tabsType', config('backpack.crud.' . $this->getCurrentOperation() . '.tabsType', 'horizontal')); |
|
10 | + $this->setOperationSetting('tabsType', config('backpack.crud.'.$this->getCurrentOperation().'.tabsType', 'horizontal')); |
|
11 | 11 | |
12 | 12 | return $this->tabsEnabled(); |
13 | 13 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | { |
115 | 115 | $all_fields = $this->getOperationFields(); |
116 | 116 | |
117 | - $fields_without_a_tab = collect($all_fields)->filter(function ($value, $key) { |
|
117 | + $fields_without_a_tab = collect($all_fields)->filter(function($value, $key) { |
|
118 | 118 | return !isset($value['tab']); |
119 | 119 | }); |
120 | 120 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | if ($this->tabExists($label)) { |
132 | 132 | $all_fields = $this->getOperationFields(); |
133 | 133 | |
134 | - $fields_for_current_tab = collect($all_fields)->filter(function ($value, $key) use ($label) { |
|
134 | + $fields_for_current_tab = collect($all_fields)->filter(function($value, $key) use ($label) { |
|
135 | 135 | return isset($value['tab']) && $value['tab'] == $label; |
136 | 136 | }); |
137 | 137 | |
@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | $fields = $this->getOperationFields(); |
151 | 151 | |
152 | 152 | $fields_with_tabs = collect($fields) |
153 | - ->filter(function ($value, $key) { |
|
153 | + ->filter(function($value, $key) { |
|
154 | 154 | return isset($value['tab']); |
155 | 155 | }) |
156 | - ->each(function ($value, $key) use (&$tabs) { |
|
156 | + ->each(function($value, $key) use (&$tabs) { |
|
157 | 157 | if (!in_array($value['tab'], $tabs)) { |
158 | 158 | $tabs[] = $value['tab']; |
159 | 159 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $column = ['name' => $column]; |
50 | 50 | } |
51 | 51 | |
52 | - if (is_array($column) && ! isset($column['name'])) { |
|
52 | + if (is_array($column) && !isset($column['name'])) { |
|
53 | 53 | $column['name'] = 'anonymous_column_'.Str::random(5); |
54 | 54 | } |
55 | 55 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function makeSureColumnHasLabel($column) |
67 | 67 | { |
68 | - if (! isset($column['label'])) { |
|
68 | + if (!isset($column['label'])) { |
|
69 | 69 | $column['label'] = mb_ucfirst($this->makeLabel($column['name'])); |
70 | 70 | } |
71 | 71 | |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | { |
83 | 83 | // if it's got a method on the model with the same name |
84 | 84 | // then it should be a relationship |
85 | - if (! isset($column['type']) && method_exists($this->model, $column['name'])) { |
|
85 | + if (!isset($column['type']) && method_exists($this->model, $column['name'])) { |
|
86 | 86 | $column['type'] = 'relationship'; |
87 | 87 | } |
88 | 88 | |
89 | - if (! isset($column['type'])) { |
|
89 | + if (!isset($column['type'])) { |
|
90 | 90 | $column['type'] = 'text'; |
91 | 91 | } |
92 | 92 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | protected function makeSureColumnHasKey($column) |
105 | 105 | { |
106 | - if (! isset($column['key'])) { |
|
106 | + if (!isset($column['key'])) { |
|
107 | 107 | $column['key'] = str_replace('.', '__', $column['name']); |
108 | 108 | } |
109 | 109 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | protected function makeSureColumnHasWrapper($column) |
123 | 123 | { |
124 | - if (! isset($column['wrapper'])) { |
|
124 | + if (!isset($column['wrapper'])) { |
|
125 | 125 | $column['wrapper'] = []; |
126 | 126 | } |
127 | 127 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | { |
140 | 140 | // if this is a relation type field and no corresponding model was specified, |
141 | 141 | // get it from the relation method defined in the main model |
142 | - if (isset($column['entity']) && ! isset($column['model'])) { |
|
142 | + if (isset($column['entity']) && !isset($column['model'])) { |
|
143 | 143 | $column['model'] = $this->getRelationModel($column['entity']); |
144 | 144 | } |
145 | 145 | |
@@ -160,8 +160,7 @@ discard block |
||
160 | 160 | $columnsArray = $this->columns(); |
161 | 161 | |
162 | 162 | if (array_key_exists($targetColumnName, $columnsArray)) { |
163 | - $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : |
|
164 | - array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
163 | + $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
165 | 164 | |
166 | 165 | $element = array_pop($columnsArray); |
167 | 166 | $beginningPart = array_slice($columnsArray, 0, $targetColumnPosition, true); |
@@ -207,7 +206,7 @@ discard block |
||
207 | 206 | { |
208 | 207 | // if a tab was mentioned, we should enable it |
209 | 208 | if (isset($column['tab'])) { |
210 | - if (! $this->tabsEnabled()) { |
|
209 | + if (!$this->tabsEnabled()) { |
|
211 | 210 | $this->enableTabs(); |
212 | 211 | } |
213 | 212 | } |