Issues (21)

src/GoogleRecaptchaProvider.php (3 issues)

Labels
Severity
1
<?php
2
3
namespace ByTIC\GoogleRecaptcha;
4
5
use ByTIC\NewRelic\Utility\NewRelic;
0 ignored issues
show
The type ByTIC\NewRelic\Utility\NewRelic was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Nip\Container\ServiceProviders\Providers\AbstractServiceProvider;
7
use Nip\Container\ServiceProviders\Providers\BootableServiceProviderInterface;
8
use Nip\Http\Kernel\Kernel;
0 ignored issues
show
The type Nip\Http\Kernel\Kernel was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use Nip\Http\Kernel\KernelInterface;
0 ignored issues
show
The type Nip\Http\Kernel\KernelInterface was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
11
/**
12
 * Class GoogleRecaptchaProvider
13
 * @package ByTIC\NewRelic
14
 */
15
class GoogleRecaptchaProvider extends AbstractServiceProvider
16
{
17
    /**
18
     * Returns a boolean if checking whether this provider provides a specific
19
     * service or returns an array of provided services if no argument passed.
20
     *
21
     * @return array
22
     */
23
    public function provides()
24
    {
25
        return ['recaptcha'];
26
    }
27
28
    public function register()
29
    {
30
        $this->registerAgent();
31
    }
32
33
    protected function registerAgent()
34
    {
35
        $this->getContainer()->share(
36
            'recaptcha',
37
            function () {
38
                $agent = NewRelic::getAgent();
39
                return $agent;
40
            }
41
        );
42
    }
43
44
}