| Conditions | 1 |
| Paths | 1 |
| Total Lines | 73 |
| Code Lines | 46 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 15 | public function __construct() |
||
| 16 | { |
||
| 17 | // Fill the resource data. |
||
| 18 | |||
| 19 | $this->description = 'The set of files required to use the AdminLTE template'; |
||
| 20 | $this->target = public_path('vendor'); |
||
| 21 | $this->required = true; |
||
| 22 | |||
| 23 | // Define the array of required assets (source). |
||
| 24 | |||
| 25 | $adminltePath = base_path('vendor/almasaeed2010/adminlte/'); |
||
| 26 | |||
| 27 | $this->source = [ |
||
| 28 | 'adminlte' => [ |
||
| 29 | 'name' => 'AdminLTE v3', |
||
| 30 | 'source' => $adminltePath, |
||
| 31 | 'target' => public_path('vendor/adminlte/'), |
||
| 32 | 'resources' => [ |
||
| 33 | [ |
||
| 34 | 'source' => 'dist/css', |
||
| 35 | 'recursive' => false, |
||
| 36 | ], |
||
| 37 | [ |
||
| 38 | 'source' => 'dist/js', |
||
| 39 | 'recursive' => false, |
||
| 40 | 'ignore' => [ |
||
| 41 | 'demo.js', |
||
| 42 | ], |
||
| 43 | ], |
||
| 44 | [ |
||
| 45 | 'source' => 'dist/img/AdminLTELogo.png', |
||
| 46 | ], |
||
| 47 | ], |
||
| 48 | ], |
||
| 49 | 'fontawesome' => [ |
||
| 50 | 'name' => 'FontAwesome 5 Free', |
||
| 51 | 'source' => $adminltePath.'/plugins/fontawesome-free', |
||
| 52 | 'target' => public_path('vendor/fontawesome-free'), |
||
| 53 | ], |
||
| 54 | 'bootstrap' => [ |
||
| 55 | 'name' => 'Bootstrap 4 (only JS files)', |
||
| 56 | 'source' => $adminltePath.'/plugins/bootstrap', |
||
| 57 | 'target' => public_path('vendor/bootstrap'), |
||
| 58 | ], |
||
| 59 | 'popper' => [ |
||
| 60 | 'name' => 'Popper.js (Bootstrap 4 requirement)', |
||
| 61 | 'source' => $adminltePath.'/plugins/popper', |
||
| 62 | 'target' => public_path('vendor/popper'), |
||
| 63 | ], |
||
| 64 | 'jquery' => [ |
||
| 65 | 'name' => 'jQuery (Bootstrap 4 requirement)', |
||
| 66 | 'source' => $adminltePath.'/plugins/jquery', |
||
| 67 | 'target' => public_path('vendor/jquery'), |
||
| 68 | 'ignore' => [ |
||
| 69 | 'core.js', |
||
| 70 | 'jquery.slim.js', |
||
| 71 | 'jquery.slim.min.js', |
||
| 72 | 'jquery.slim.min.map', |
||
| 73 | ], |
||
| 74 | ], |
||
| 75 | 'overlay' => [ |
||
| 76 | 'name' => 'Overlay Scrollbars', |
||
| 77 | 'source' => $adminltePath.'/plugins/overlayScrollbars', |
||
| 78 | 'target' => public_path('vendor/overlayScrollbars'), |
||
| 79 | ], |
||
| 80 | ]; |
||
| 81 | |||
| 82 | // Fill the set of installation messages. |
||
| 83 | |||
| 84 | $this->messages = [ |
||
| 85 | 'install' => 'Do you want to publish the AdminLTE asset files?', |
||
| 86 | 'overwrite' => 'AdminLTE asset files were already published. Want to replace?', |
||
| 87 | 'success' => 'AdminLTE assets files published successfully', |
||
| 88 | ]; |
||
| 295 |