Passed
Push — develop ( d38868...21087d )
by Mario
01:26
created

StaffProvider::findUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Security\Provider;
4
5
use Ds\Component\Security\Model\Identity;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Security\Model\Identity 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 FOS\UserBundle\Security\UserProvider;
0 ignored issues
show
Bug introduced by
The type FOS\UserBundle\Security\UserProvider 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...
7
8
/**
9
 * Class StaffProvider
10
 */
11
final class StaffProvider extends UserProvider
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    protected function findUser($username)
17
    {
18
        $user = $this->userManager->findUserBy([
19
            'username' => $username,
20
            'identity' => Identity::STAFF
21
        ]);
22
23
        return $user;
24
    }
25
}
26