vovarpd /
laravel-anticaptcha
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace LaravelAnticaptcha; |
||||
| 4 | |||||
| 5 | use Illuminate\Support\ServiceProvider; |
||||
|
0 ignored issues
–
show
|
|||||
| 6 | use LaravelAnticaptcha\Anticaptcha\CustomCaptcha; |
||||
| 7 | use LaravelAnticaptcha\Anticaptcha\FunCaptcha; |
||||
| 8 | use LaravelAnticaptcha\Anticaptcha\FunCaptchaProxyless; |
||||
| 9 | use LaravelAnticaptcha\Anticaptcha\GeeTest; |
||||
| 10 | use LaravelAnticaptcha\Anticaptcha\GeeTestProxyless; |
||||
| 11 | use LaravelAnticaptcha\Anticaptcha\ImageToText; |
||||
| 12 | use LaravelAnticaptcha\Anticaptcha\NoCaptcha; |
||||
| 13 | use LaravelAnticaptcha\Anticaptcha\NoCaptchaProxyless; |
||||
| 14 | |||||
| 15 | class AnticaptchaServiceProvider extends ServiceProvider { |
||||
| 16 | public $defer = true; |
||||
| 17 | |||||
| 18 | public function boot() { |
||||
| 19 | $this->publishes([ |
||||
| 20 | __DIR__.'/../config/anticaptcha.php' => config_path('anticaptcha.php'), |
||||
|
0 ignored issues
–
show
The function
config_path was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 21 | ], 'anticaptcha'); |
||||
| 22 | |||||
| 23 | $this->mergeConfigFrom( |
||||
| 24 | __DIR__.'/../config/anticaptcha.php', |
||||
| 25 | 'anticaptcha' |
||||
| 26 | ); |
||||
| 27 | |||||
| 28 | } |
||||
| 29 | |||||
| 30 | public function register() { |
||||
| 31 | |||||
| 32 | $this->app->singleton(NoCaptchaProxyless::class, function($app) { |
||||
| 33 | $instance = new NoCaptchaProxyless(); |
||||
| 34 | $instance->setKey(config('anticaptcha.key')); |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 35 | |||||
| 36 | return $instance; |
||||
| 37 | } ); |
||||
| 38 | |||||
| 39 | $this->app->singleton(NoCaptcha::class, function($app) { |
||||
| 40 | $instance = new NoCaptcha(); |
||||
| 41 | $instance->setKey(config('anticaptcha.key')); |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 42 | |||||
| 43 | return $instance; |
||||
| 44 | } ); |
||||
| 45 | |||||
| 46 | $this->app->singleton(ImageToText::class, function($app) { |
||||
| 47 | $instance = new ImageToText(); |
||||
| 48 | $instance->setKey(config('anticaptcha.key')); |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 49 | |||||
| 50 | return $instance; |
||||
| 51 | } ); |
||||
| 52 | |||||
| 53 | $this->app->singleton(GeeTestProxyless::class, function($app) { |
||||
| 54 | $instance = new GeeTestProxyless(); |
||||
| 55 | $instance->setKey(config('anticaptcha.key')); |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 56 | |||||
| 57 | return $instance; |
||||
| 58 | } ); |
||||
| 59 | |||||
| 60 | $this->app->singleton(GeeTest::class, function($app) { |
||||
| 61 | $instance = new GeeTest(); |
||||
| 62 | $instance->setKey(config('anticaptcha.key')); |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 63 | |||||
| 64 | return $instance; |
||||
| 65 | } ); |
||||
| 66 | |||||
| 67 | $this->app->singleton(FunCaptchaProxyless::class, function($app) { |
||||
| 68 | $instance = new FunCaptchaProxyless(); |
||||
| 69 | $instance->setKey(config('anticaptcha.key')); |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 70 | |||||
| 71 | return $instance; |
||||
| 72 | } ); |
||||
| 73 | |||||
| 74 | $this->app->singleton(FunCaptcha::class, function($app) { |
||||
| 75 | $instance = new FunCaptcha(); |
||||
| 76 | $instance->setKey(config('anticaptcha.key')); |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 77 | |||||
| 78 | return $instance; |
||||
| 79 | } ); |
||||
| 80 | |||||
| 81 | $this->app->singleton(CustomCaptcha::class, function($app) { |
||||
| 82 | $instance = new CustomCaptcha(); |
||||
| 83 | $instance->setKey(config('anticaptcha.key')); |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 84 | |||||
| 85 | return $instance; |
||||
| 86 | } ); |
||||
| 87 | |||||
| 88 | } |
||||
| 89 | |||||
| 90 | public function provides() { |
||||
| 91 | return [ |
||||
| 92 | NoCaptchaProxyless::class, |
||||
| 93 | NoCaptcha::class, |
||||
| 94 | ImageToText::class, |
||||
| 95 | GeeTestProxyless::class, |
||||
| 96 | GeeTest::class, |
||||
| 97 | FunCaptchaProxyless::class, |
||||
| 98 | FunCaptcha::class, |
||||
| 99 | CustomCaptcha::class |
||||
| 100 | ]; |
||||
| 101 | } |
||||
| 102 | |||||
| 103 | } |
||||
| 104 |
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