Conditions | 7 |
Paths | 8 |
Total Lines | 22 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function boot(FeatureManager $feature) |
||
17 | { |
||
18 | if ($this->app->runningInConsole()) { |
||
19 | $this->publishes([ |
||
20 | __DIR__.'/../config/features.php' => config_path('features.php'), |
||
21 | ], 'config'); |
||
22 | } |
||
23 | |||
24 | if (class_exists(\Illuminate\Routing\Route::class)) { |
||
25 | \Illuminate\Routing\Route::macro('feature', function (string $name, string $function = '') use ($feature) { |
||
26 | feature($name, empty(trim($function)) ? 'routes' : "routes.$function") ? null : $this->uses('\M1guelpf\Feature\FeatureDisabledController'); |
||
|
|||
27 | |||
28 | return $this; |
||
29 | }); |
||
30 | } |
||
31 | |||
32 | if (class_exists(\Illuminate\Support\Facades\Blade::class)) { |
||
33 | \Illuminate\Support\Facades\Blade::if('feature', function (string $name, string $function = '') { |
||
34 | return feature($name, empty(trim($function)) ? 'views' : "views.$function"); |
||
35 | }); |
||
36 | } |
||
37 | } |
||
38 | |||
53 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.