We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
7 | class CrudServiceProvider extends ServiceProvider |
||
8 | { |
||
9 | /** |
||
10 | * Indicates if loading of the provider is deferred. |
||
11 | * |
||
12 | * @var bool |
||
13 | */ |
||
14 | protected $defer = false; |
||
15 | |||
16 | /** |
||
17 | * Perform post-registration booting of services. |
||
18 | * |
||
19 | * @return void |
||
20 | */ |
||
21 | public function boot() |
||
22 | { |
||
23 | // LOAD THE VIEWS |
||
24 | |||
25 | // - first the published/overwritten views (in case they have any changes) |
||
26 | $this->loadViewsFrom(resource_path('views/vendor/backpack/crud'), 'crud'); |
||
27 | // - then the stock views that come with the package, in case a published view might be missing |
||
28 | $this->loadViewsFrom(realpath(__DIR__.'/resources/views'), 'crud'); |
||
29 | |||
30 | $this->loadTranslationsFrom(realpath(__DIR__.'/resources/lang'), 'backpack'); |
||
31 | |||
32 | |||
33 | // PUBLISH FILES |
||
34 | |||
35 | // publish lang files |
||
36 | $this->publishes([__DIR__.'/resources/lang' => resource_path('lang/vendor/backpack')], 'lang'); |
||
37 | |||
38 | // publish views |
||
39 | $this->publishes([__DIR__.'/resources/views' => resource_path('views/vendor/backpack/crud')], 'views'); |
||
40 | |||
41 | // publish config file |
||
42 | $this->publishes([__DIR__.'/config' => config_path()], 'config'); |
||
43 | |||
44 | // publish public Backpack CRUD assets |
||
45 | $this->publishes([__DIR__.'/public' => public_path('vendor/backpack')], 'public'); |
||
46 | |||
47 | // publish custom files for elFinder |
||
48 | $this->publishes([ |
||
49 | __DIR__.'/config/elfinder.php' => config_path('elfinder.php'), |
||
50 | __DIR__.'/resources/views-elfinder' => resource_path('views/vendor/elfinder'), |
||
51 | ], 'elfinder'); |
||
52 | |||
53 | |||
54 | // use the vendor configuration file as fallback |
||
55 | $this->mergeConfigFrom( |
||
56 | __DIR__.'/config/backpack/crud.php', 'backpack.crud' |
||
57 | ); |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * Register any package services. |
||
62 | * |
||
63 | * @return void |
||
64 | */ |
||
65 | public function register() |
||
84 | |||
85 | public static function resource($name, $controller, array $options = []) |
||
89 | } |
||
90 |
This check looks for accesses to local static members using the fully qualified name instead of
self::
.While this is perfectly valid, the fully qualified name of
Certificate::TRIPLEDES_CBC
could just as well be replaced byself::TRIPLEDES_CBC
. Referencing local members withself::
assured the access will still work when the class is renamed, makes it perfectly clear that the member is in fact local and will usually be shorter.