| @@ -26,8 +26,8 @@ discard block | ||
| 26 | 26 | |
| 27 | 27 | $result = \Schema::getColumnListing($table); | 
| 28 | 28 | |
| 29 | -        $result = array_filter($result, function ($row) { | |
| 30 | - return ! (in_array($row, ['created_at', 'deleted_at', 'updated_at'])); | |
| 29 | +        $result = array_filter($result, function($row) { | |
| 30 | + return !(in_array($row, ['created_at', 'deleted_at', 'updated_at'])); | |
| 31 | 31 | }); | 
| 32 | 32 | |
| 33 | 33 | $newResult = []; | 
| @@ -35,7 +35,7 @@ discard block | ||
| 35 | 35 | $type = \Schema::getColumnType($table, $row); | 
| 36 | 36 | $newResult[] = ['name' => $row, 'type' => $this->getFieldType($row, $type)]; | 
| 37 | 37 | |
| 38 | -            if (! in_array($type, ['list', 'detail']) || ! starts_with($row, 'id_')) { | |
| 38 | +            if (!in_array($type, ['list', 'detail']) || !starts_with($row, 'id_')) { | |
| 39 | 39 | continue; | 
| 40 | 40 | } | 
| 41 | 41 | |
| @@ -80,8 +80,8 @@ discard block | ||
| 80 | 80 | } | 
| 81 | 81 | $table2 = substr($ro, 3); | 
| 82 | 82 | $columns = DB::getSchemaBuilder()->getColumnListing($table2); | 
| 83 | -        $columns = array_filter($columns, function ($col) { | |
| 84 | - return ! FieldDetector::isExceptional($col); | |
| 83 | +        $columns = array_filter($columns, function($col) { | |
| 84 | + return !FieldDetector::isExceptional($col); | |
| 85 | 85 | }); | 
| 86 | 86 | |
| 87 | 87 |          foreach ($columns as $col) { | 
| @@ -60,7 +60,7 @@ | ||
| 60 | 60 |      { | 
| 61 | 61 | $methods = (new \ReflectionClass($ctrl))->getMethods(\ReflectionMethod::IS_PUBLIC); | 
| 62 | 62 | |
| 63 | -        return array_filter($methods, function ($method) { | |
| 63 | +        return array_filter($methods, function($method) { | |
| 64 | 64 | return ($method->class !== 'Illuminate\Routing\Controller' && $method->name !== 'getIndex'); | 
| 65 | 65 | }); | 
| 66 | 66 | } | 
| @@ -68,7 +68,7 @@ discard block | ||
| 68 | 68 |          if ($filter_is_orderby === true) { | 
| 69 | 69 | (new Order($this->cb))->handle($result, $table); | 
| 70 | 70 | } | 
| 71 | - $limit = is_string($limit) ? (int)$limit : 15; | |
| 71 | + $limit = is_string($limit) ? (int) $limit : 15; | |
| 72 | 72 | $data['result'] = $result->paginate($limit); | 
| 73 | 73 | |
| 74 | 74 | $data['columns'] = $columns_table; | 
| @@ -80,7 +80,7 @@ discard block | ||
| 80 | 80 | //LISTING INDEX HTML | 
| 81 | 81 | $addAction = $CbCtrl->data['addAction']; | 
| 82 | 82 | |
| 83 | -        if (! empty($CbCtrl->sub_module)) { | |
| 83 | +        if (!empty($CbCtrl->sub_module)) { | |
| 84 | 84 | $addAction = $this->_handleSubModules($addAction); | 
| 85 | 85 | } | 
| 86 | 86 | |
| @@ -101,7 +101,7 @@ discard block | ||
| 101 | 101 | private function _handleParentTable() | 
| 102 | 102 |      { | 
| 103 | 103 | $data = []; | 
| 104 | -        $parent = (string)request('parent_table'); | |
| 104 | +        $parent = (string) request('parent_table'); | |
| 105 | 105 |          $pk = DbInspector::findPk(request('parent_table')); | 
| 106 | 106 | |
| 107 | 107 |          $data['parent_table'] = DB::table($parent)->where($pk, request('parent_id'))->first(); | 
| @@ -111,7 +111,7 @@ discard block | ||
| 111 | 111 | $data['parent_field'] = DbInspector::getTableForeignKey($parent); | 
| 112 | 112 | } | 
| 113 | 113 | |
| 114 | -        if (! $data['parent_field']) { | |
| 114 | +        if (!$data['parent_field']) { | |
| 115 | 115 | return $data; | 
| 116 | 116 | } | 
| 117 | 117 | |
| @@ -129,7 +129,7 @@ discard block | ||
| 129 | 129 | */ | 
| 130 | 130 | private function _filterForParent($result) | 
| 131 | 131 |      { | 
| 132 | -        if (! request('parent_id')) { | |
| 132 | +        if (!request('parent_id')) { | |
| 133 | 133 | return null; | 
| 134 | 134 | } | 
| 135 | 135 | |
| @@ -143,7 +143,7 @@ discard block | ||
| 143 | 143 | */ | 
| 144 | 144 | private function _filterOutSoftDeleted($tableColumns, $result) | 
| 145 | 145 |      { | 
| 146 | -        if (! in_array('deleted_at', $tableColumns)) { | |
| 146 | +        if (!in_array('deleted_at', $tableColumns)) { | |
| 147 | 147 | return; | 
| 148 | 148 | } | 
| 149 | 149 | $result->where($this->table.'.deleted_at', '=', null); | 
| @@ -202,9 +202,9 @@ discard block | ||
| 202 | 202 | private function _applyWhereAndQfilters($result, $columnsTable, $table) | 
| 203 | 203 |      { | 
| 204 | 204 |          if (request('q')) { | 
| 205 | -            $result->where(function ($query) use ($columnsTable) { | |
| 205 | +            $result->where(function($query) use ($columnsTable) { | |
| 206 | 206 |                  foreach ($columnsTable as $col) { | 
| 207 | -                    if (! $col['field_with']) { | |
| 207 | +                    if (!$col['field_with']) { | |
| 208 | 208 | continue; | 
| 209 | 209 | } | 
| 210 | 210 |                      $query->orwhere($col['field_with'], "like", "%".request("q")."%"); | 
| @@ -248,7 +248,7 @@ discard block | ||
| 248 | 248 | return CRUDBooster::adminPath($module['path']).'?parent_table='.$table_parent.'&parent_columns=' | 
| 249 | 249 | .$module['parent_columns'].'&parent_columns_alias=' | 
| 250 | 250 | .$module['parent_columns_alias'].'&parent_id=[' | 
| 251 | - .(! isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id']) | |
| 251 | + .(!isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id']) | |
| 252 | 252 | .']&return_url='.urlencode(Request::fullUrl()).'&foreign_key=' | 
| 253 | 253 | .$module['foreign_key'].'&label='.urlencode($module['label']); | 
| 254 | 254 | } |