We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 7 |
Paths | 9 |
Total Lines | 70 |
Code Lines | 60 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 3 | Features | 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 |
||
55 | public function boot(Router $router) |
||
56 | { |
||
57 | $this->loadTranslationsFrom(realpath(__DIR__.'/resources/lang'), 'backpack'); |
||
58 | $this->loadConfigs(); |
||
59 | $this->registerMiddlewareGroup($this->app->router); |
||
60 | $this->setupRoutes($this->app->router); |
||
61 | $this->setupCustomRoutes($this->app->router); |
||
62 | $this->publishFiles(); |
||
63 | $this->sendUsageStats(); |
||
64 | |||
65 | Basset::addViewPath(realpath(__DIR__.'/resources/views')); |
||
66 | |||
67 | Basset::map('bp-jquery', 'https://unpkg.com/[email protected]/dist/jquery.min.js', ['integrity' => 'sha384-i61gTtaoovXtAbKjo903+O55Jkn2+RtzHtvNez+yI49HAASvznhe9sZyjaSHTau9', 'crossorigin' => 'anonymous']); |
||
68 | Basset::map('bp-popper-js', 'https://unpkg.com/@popperjs/[email protected]/dist/umd/popper.min.js', ['integrity' => 'sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3', 'crossorigin' => 'anonymous']); |
||
69 | Basset::map('bp-summernote-css', 'https://unpkg.com/[email protected]/dist/summernote-lite.min.css', ['integrity' => 'sha384-vmPR5F5DxvnVZxuw9+hxaSj8MDX3rP49GZu/JvPS1qYD2xeg+0TGJUJ/H6e/HTkV', 'crossorigin' => 'anonymous']); |
||
70 | Basset::map('bp-summernote-woof', 'https://unpkg.com/[email protected]/dist/font/summernote.woff2', ['integrity' => 'sha384-jin6VSG0kKkHctWc/DhVx2PL8YqVcnWvrAcqrTkLdi9evxi77MNjsgSUqbNGWijo', 'crossorigin' => 'anonymous']); |
||
71 | Basset::map('bp-datatables-js', 'https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js', ['integrity' => 'sha384-t11ZTRbO9om+k0pVXmc3c8SsIHonT3oUvoi3FxMm1c9DVQwl9VbTNv3+UjbUrI6Z', 'crossorigin' => 'anonymous']); |
||
72 | Basset::map('bp-datatables-bootstrap-js', 'https://cdn.datatables.net/1.13.1/js/dataTables.bootstrap5.min.js', ['integrity' => 'sha384-bHpoWS7HfBjbqWmqPFVsEwT0EyCKgMw/hbKswCjYLSLS+TyPUAG51MTMIXgy/4Pl', 'crossorigin' => 'anonymous']); |
||
73 | Basset::map('bp-datatables-bootstrap-css', 'https://cdn.datatables.net/1.13.1/css/dataTables.bootstrap5.min.css', ['integrity' => 'sha384-GADhaOJCr6lsUqdHJnYcH/QaARzVT92beGzAYxLTSoxUorHjQZci1FW+X9BqbnE3', 'crossorigin' => 'anonymous']); |
||
74 | Basset::map('bp-datatables-responsive-js', 'https://cdn.datatables.net/responsive/2.4.0/js/dataTables.responsive.min.js', ['integrity' => 'sha384-yYqZ2Jue83rlzHS23Jp/xwZjRZ9KQCACGR5lhhWFtDIQeBMwAuav+irRqSKrucSP', 'crossorigin' => 'anonymous']); |
||
75 | Basset::map('bp-datatables-responsive-css', 'https://cdn.datatables.net/responsive/2.4.0/css/responsive.dataTables.min.css', ['integrity' => 'sha384-cWgz6YKDgXz/mTomsnOIXd/1s0iivK+FhwVdmzN0ErdazMmt4RieKmZXMWdwScEm', 'crossorigin' => 'anonymous']); |
||
76 | Basset::map('bp-datatables-fixedheader-js', 'https://cdn.datatables.net/fixedheader/3.3.1/js/dataTables.fixedHeader.min.js', ['integrity' => 'sha384-PeR7ate8YuUE8EYJp3d9zNrgSm9jFJL1b2Hrb8Za0RtVj6YMU8IZlyBwlRjiXq0i', 'crossorigin' => 'anonymous']); |
||
77 | Basset::map('bp-datatables-fixedheader-css', 'https://cdn.datatables.net/fixedheader/3.3.1/css/fixedHeader.dataTables.min.css', ['integrity' => 'sha384-g0QDiyi3I9zPzO1O8mvkZd0/MWDKDs8Lk+pHQo3+kkTJEFTdzDCwjqIuoOG+yG0q', 'crossorigin' => 'anonymous']); |
||
78 | Basset::map('bp-datatables-buttons-bs5-css', 'https://cdn.datatables.net/buttons/2.3.3/css/buttons.bootstrap5.min.css', ['integrity' => 'sha384-vLlNBaHuV6cqBlVjiJITSKkzOaeomPYdKV54KsyxIF88PDfOKqDRzlHSe5FVMe/4', 'crossorigin' => 'anonymous']); |
||
79 | Basset::map('bp-datatables-dt-buttons-bs5-js', 'https://cdn.datatables.net/buttons/2.3.3/js/dataTables.buttons.min.js', ['integrity' => 'sha384-4UCu2Y40paen66DRD9HqMQTQDFzPOPrHQQ3Hj3il7NOYMVE9+8PKV9YqrNjOvB+G', 'crossorigin' => 'anonymous']); |
||
80 | Basset::map('bp-datatables-buttons-bs5-js', 'https://cdn.datatables.net/buttons/2.3.3/js/buttons.bootstrap5.min.js', ['integrity' => 'sha384-ydNsKc6RC3ZCjn9sUZuBlPsIf/bBKmjNuYZZzBTvNag/JKDcIlRstd/eU+ZifNxM', 'crossorigin' => 'anonymous']); |
||
81 | Basset::map('bp-datatables-jszip', 'https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js', ['integrity' => 'sha384-yib/J8n+cev8VyEYY+4A3nSvnqCRhEkxUQhVFp8X+YuIXd0qhT3rTYXqel0zWzni', 'crossorigin' => 'anonymous']); |
||
82 | Basset::map('bp-datatables-pdfmake', 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.18/pdfmake.min.js', ['integrity' => 'sha384-7B0GkWcyEmGJnsHkE0Z0cCpXaUS9i1tFM1/e0jAKoxA2YkI2XYaZdCOJo0kBBsS5', 'crossorigin' => 'anonymous']); |
||
83 | Basset::map('bp-datatables-pdfmake-fonts', 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.18/vfs_fonts.js', ['integrity' => 'sha384-Zu5dDR1DhOW4Qpz55vgv84xMQSt0V2nX/rGj309pIyhOnc2KHssTcYszIjiYUjYL', 'crossorigin' => 'anonymous']); |
||
84 | Basset::map('bp-datatables-html5-button', 'https://cdn.datatables.net/buttons/2.3.2/js/buttons.html5.min.js', ['integrity' => 'sha384-+KP6ruIqPlKDSU+EJ+oMlSh7cUCDWe2rHFaGVL4iHG4plXJaco2DetEl6yOrugqf', 'crossorigin' => 'anonymous']); |
||
85 | Basset::map('bp-datatables-print-button', 'https://cdn.datatables.net/buttons/2.3.2/js/buttons.print.min.js', ['integrity' => 'sha384-5MVvNT5w7ht9uU89ZuYPDHs3Yap4hV/h/cPjiKBHdbS2pDKuY4ADmve/XwXN5oPQ', 'crossorigin' => 'anonymous']); |
||
86 | Basset::map('bp-datatables-colvis-button', 'https://cdn.datatables.net/buttons/2.3.2/js/buttons.colVis.min.js', ['integrity' => 'sha384-iWhT+VbS/XoLnEHwlRhpwgeNPjEFIs88MypVWxe99IVGqXljIX4vdFLr3fAbRGHM', 'crossorigin' => 'anonymous']); |
||
87 | Basset::map('bp-urijs', 'https://unpkg.com/[email protected]/src/URI.min.js', ['integrity' => 'sha384-VS1T95+I9NZNIjvlP0D/3HRlU1sKmoBzh71Pt08ckCdxEM2++7QEdbbp/3gi20js', 'crossorigin' => 'anonymous']); |
||
88 | Basset::map('bp-highlight-js', 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js', ['integrity' => 'sha512-gU7kztaQEl7SHJyraPfZLQCNnrKdaQi5ndOyt4L4UPL/FHDd/uB9Je6KDARIqwnNNE27hnqoWLBq+Kpe4iHfeQ==', 'crossorigin' => 'anonymous']); |
||
89 | Basset::map('bp-highlight-css', 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/base16/dracula.min.css', ['integrity' => 'sha512-GfRggx2Wc+POEPR0asMTNTyNug3rWJ9Jp4wxnHZ5VApMOUJRK4cEaRriXsx5tV1DakKHQWQ2noCbuzFiPJaYqA==', 'crossorigin' => 'anonymous']); |
||
90 | Basset::map('bp-animate-css', 'https://unpkg.com/[email protected]/animate.compat.css', ['integrity' => 'sha384-B6emdNLLuHwwngyCsBGzzo6MQPmSygQu5cG4lfUfdSxzj0FJVJZu+7GOmB8/NHpd', 'crossorigin' => 'anonymous']); |
||
91 | Basset::map('bp-noty-css', 'https://unpkg.com/[email protected]/lib/noty.css', ['integrity' => 'sha384-J/zBMo8aKN23nuimkvPbkLpGS1Uf1eCha++IoQfNVUpYCjvkuzLqO9nc4wizNAsv', 'crossorigin' => 'anonymous']); |
||
92 | Basset::map('bp-lineawesome-css', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/css/line-awesome.min.css', ['integrity' => 'sha512-vebUliqxrVkBy3gucMhClmyQP9On/HAWQdKDXRaAlb/FKuTbxkjPKUyqVOxAcGwFDka79eTF+YXwfke1h3/wfg==', 'crossorigin' => 'anonymous']); |
||
93 | Basset::map('bp-lineawesome-regular-400', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-regular-400.woff2', ['integrity' => 'sha384-2MTGaE1Ew+cNL5I7ilrE0E2sXLiuf90OL5DDceb5boJQOSLbVZCEHWpUPpvdOF4Z', 'crossorigin' => 'anonymous']); |
||
94 | Basset::map('bp-lineawesome-solid-900', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.woff2', ['integrity' => 'sha384-6Y7zlEnVxM1wRcJx7qtpAK54L2QoP4CcAaosx1EKa3QOLvq0LjT7Fus7E9IDidgR', 'crossorigin' => 'anonymous']); |
||
95 | Basset::map('bp-lineawesome-brands-400', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.woff2', ['integrity' => 'sha384-4EZZRKjFRNbc6sX193USv6Is1dJHSHzcGtijtyeUV2KQFRhVgpeWsrebTKu7RKEl', 'crossorigin' => 'anonymous']); |
||
96 | Basset::map('bp-lineawesome-regular-400-woff', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-regular-400.woff', ['integrity' => 'sha384-Pu6x4bfCQDro/gELWySVvZ04SlesuYt1QlQH2zvv1i43+7E6HkUIGGOixPLtP3XX', 'crossorigin' => 'anonymous']); |
||
97 | Basset::map('bp-lineawesome-solid-900-woff', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.woff', ['integrity' => 'sha384-Ik+er7DjVwGt6ex3J05QtimAVRCq1JxCWf+t5n7fW80EAQS99uIIk+FJfIRy8sSN', 'crossorigin' => 'anonymous']); |
||
98 | Basset::map('bp-lineawesome-brands-400-woff', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.woff', ['integrity' => 'sha384-gamww7YJnsFRoFVACJb6kLAoK2emK2ZIuoZgyvBM4kaEPEu3xDE/ivmXQmrYKp+l', 'crossorigin' => 'anonymous']); |
||
99 | Basset::map('bp-lineawesome-regular-400-ttf', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-regular-400.ttf', ['integrity' => 'sha384-1zzwN3v7UDtBGkTNjIFcNTy1U3dQTa5nix6OaV0CY5YXqxhlXDm0dum9bWOfpbqF', 'crossorigin' => 'anonymous']); |
||
100 | Basset::map('bp-lineawesome-solid-900-ttf', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.ttf', ['integrity' => 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-solid-900.ttf', 'crossorigin' => 'anonymous']); |
||
101 | Basset::map('bp-lineawesome-brands-400-ttf', 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.ttf', ['integrity' => 'https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/fonts/la-brands-400.ttf', 'crossorigin' => 'anonymous']); |
||
102 | Basset::map('bp-summernote-js', 'https://unpkg.com/[email protected]/dist/summernote-lite.min.js', ['integrity' => 'sha384-fq3mhgSZ+13XGKx7olcZUFWes9hDmAR3b/WnNLKH6fRFsHonf6CGG+Dj1wypCgLq', 'crossorigin' => 'anonymous']); |
||
103 | Basset::map('bp-noty-js', 'https://unpkg.com/[email protected]/lib/noty.min.js', ['integrity' => 'sha384-z7oxDqgQB0ThPzpmEjy9pcQT5oLRWvagLjZypnMIdKqBBLLvKNINZdifoEEPmrn1', 'crossorigin' => 'anonymous']); |
||
104 | Basset::map('bp-sweet-alert-js', 'https://unpkg.com/[email protected]/dist/sweetalert.min.js', ['integrity' => 'sha384-RIQuldGV8mnjGdob13cay/K1AJa+LR7VKHqSXrrB5DPGryn4pMUXRLh92Ev8KlGF', 'crossorigin' => 'anonymous']); |
||
105 | Basset::map('bp-bootstrap4-js', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/js/bootstrap.min.js', ['integrity' => 'sha512-7rusk8kGPFynZWu26OKbTeI+QPoYchtxsmPeBqkHIEXJxeun4yJ4ISYe7C6sz9wdxeE1Gk3VxsIWgCZTc+vX3g==', 'crossorigin' => 'anonymous']); |
||
106 | Basset::map('bp-bootstrap5-js', 'https://unpkg.com/[email protected]/dist/js/bootstrap.min.js', ['integrity' => 'sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V', 'crossorigin' => 'anonymous']); |
||
107 | |||
108 | foreach (config('backpack.ui.styles', []) as $style) { |
||
109 | if (is_array($style)) { |
||
110 | foreach ($style as $file) { |
||
111 | Basset::map($file); |
||
112 | } |
||
113 | } else { |
||
114 | Basset::map($style); |
||
115 | } |
||
116 | } |
||
117 | |||
118 | foreach (config('backpack.ui.scripts', []) as $script) { |
||
119 | if (is_array($script)) { |
||
120 | foreach ($script as $file) { |
||
121 | Basset::map($file); |
||
122 | } |
||
123 | } else { |
||
124 | Basset::map($script); |
||
125 | } |
||
432 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths