GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 30-30 lines in 2 locations

src/Condition/IsInstanceOf.php 1 location

@@ 8-37 (lines=30) @@
5
use Doctrine\ORM\QueryBuilder;
6
use Rb\Specification\Doctrine\AbstractSpecification;
7
8
class IsInstanceOf extends AbstractSpecification
9
{
10
    /**
11
     * @var string
12
     */
13
    private $className;
14
15
    /**
16
     * @param string $field
17
     * @param string $className
18
     * @param string $dqlAlias
19
     */
20
    public function __construct($field, $className, $dqlAlias = null)
21
    {
22
        $this->className = $className;
23
24
        parent::__construct($field, $dqlAlias);
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function modify(QueryBuilder $queryBuilder, $dqlAlias)
31
    {
32
        return (string) $queryBuilder->expr()->isInstanceOf(
33
            $this->createPropertyWithAlias($dqlAlias),
34
            $this->className
35
        );
36
    }
37
}
38

src/Condition/IsMemberOf.php 1 location

@@ 8-37 (lines=30) @@
5
use Doctrine\ORM\QueryBuilder;
6
use Rb\Specification\Doctrine\AbstractSpecification;
7
8
class IsMemberOf extends AbstractSpecification
9
{
10
    /**
11
     * @var string
12
     */
13
    private $className;
14
15
    /**
16
     * @param string $field
17
     * @param string $className
18
     * @param string $dqlAlias
19
     */
20
    public function __construct($field, $className, $dqlAlias = null)
21
    {
22
        $this->className = $className;
23
24
        parent::__construct($field, $dqlAlias);
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function modify(QueryBuilder $queryBuilder, $dqlAlias)
31
    {
32
        return (string) $queryBuilder->expr()->isMemberOf(
33
            $this->createPropertyWithAlias($dqlAlias),
34
            $this->className
35
        );
36
    }
37
}
38