Passed
Pull Request — master (#32)
by
unknown
02:19
created

setCustomAuthenticators()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
4
namespace Firesphere\GraphQLJWT\Authentication;
5
6
7
use Firesphere\GraphQLJWT\Mutations\CreateTokenMutationCreator;
0 ignored issues
show
Bug introduced by
The type Firesphere\GraphQLJWT\Mu...ateTokenMutationCreator 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...
8
use SilverStripe\Core\Injector\Injectable;
9
use SilverStripe\Security\Authenticator;
10
11
class CustomAuthenticatorRegistry
12
{
13
    use Injectable;
14
15
    /**
16
     * Extra authenticators to use for logging in with username / password
17
     *
18
     * @var Authenticator[]
19
     */
20
    protected $customAuthenticators = [];
21
22
    /**
23
     * @return Authenticator[]
24
     */
25
    public function getCustomAuthenticators(): array
26
    {
27
        return $this->customAuthenticators;
28
    }
29
30
    /**
31
     * @param Authenticator[] $authenticators
32
     * @return $this
33
     */
34
    public function setCustomAuthenticators(array $authenticators): self
35
    {
36
        $this->customAuthenticators = $authenticators;
37
        return $this;
38
    }
39
40
}
41