@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | class Step2Handler |
9 | 9 | { |
10 | 10 | private $hooks = ['hook_query_index', 'hook_row_index', 'hook_before_add', 'hook_after_add', |
11 | - 'hook_before_edit', 'hook_after_edit', 'hook_before_delete', 'hook_after_delete',]; |
|
11 | + 'hook_before_edit', 'hook_after_edit', 'hook_before_delete', 'hook_after_delete', ]; |
|
12 | 12 | |
13 | 13 | public function showForm($id) |
14 | 14 | { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $data['cols'] = ScaffoldingParser::parse($controllerCode, 'col'); |
26 | 26 | |
27 | 27 | |
28 | - foreach($this->hooks as $hook){ |
|
28 | + foreach ($this->hooks as $hook) { |
|
29 | 29 | $data[$hook] = FileManipulator::readMethodContent($controllerCode, $hook); |
30 | 30 | } |
31 | 31 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $code = FileManipulator::readCtrlContent($controller); |
42 | 42 | $fileResult = FileManipulator::replaceBetweenMark($code, 'COLUMNS', $newCode); |
43 | 43 | |
44 | - foreach($this->hooks as $hook){ |
|
44 | + foreach ($this->hooks as $hook) { |
|
45 | 45 | $fileResult = FileManipulator::writeMethodContent($fileResult, $hook, request($hook)); |
46 | 46 | } |
47 | 47 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $columnScript[] = ' $this->col[] = [];'; |
66 | 66 | foreach ($labels as $i => $label) { |
67 | 67 | |
68 | - if (! $name[$i]) { |
|
68 | + if (!$name[$i]) { |
|
69 | 69 | continue; |
70 | 70 | } |
71 | 71 |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | public static function myPrivilege() |
75 | 75 | { |
76 | 76 | $roles = session('admin_privileges_roles'); |
77 | - if (! $roles) { |
|
77 | + if (!$roles) { |
|
78 | 78 | return; |
79 | 79 | } |
80 | 80 | foreach ($roles as $role) { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | private static function getModulePath() |
88 | 88 | { |
89 | - $adminPathSegments = count(explode('/',cbConfig('ADMIN_PATH'))); |
|
89 | + $adminPathSegments = count(explode('/', cbConfig('ADMIN_PATH'))); |
|
90 | 90 | return Request::segment(1 + $adminPathSegments); |
91 | 91 | } |
92 | 92 |