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.
Completed
Push — master ( 61d647...5c0fd8 )
by Odiseo
08:26
created

AddressRepository::findByCityName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Odiseo\SyliusReportPlugin\Repository;
6
7
use Sylius\Bundle\CoreBundle\Doctrine\ORM\AddressRepository as BaseAddressRepository;
8
use Sylius\Component\Addressing\Model\Province;
9
10
/**
11
 * @author Diego D'amico <[email protected]>
12
 */
13
class AddressRepository extends BaseAddressRepository implements AddressRepositoryInterface
14
{
15
    /**
16
     * @inheritdoc
17
     */
18
    public function findByCityName(string $cityName): array
19
    {
20
        return $this->createQueryBuilder('o')
21
            ->andWhere('o.city LIKE :city')
22
            ->setParameter('city', '%' . $cityName . '%')
23
            ->getQuery()
24
            ->getResult()
25
        ;
26
    }
27
28
    /**
29
     * @inheritdoc
30
     */
31
    public function findByProvinceName(string $provinceName): array
32
    {
33
        return $this->createQueryBuilder('o')
34
            ->leftJoin(Province::class, 'p', 'WITH', 'p.code = o.provinceCode')
35
            ->where('o.provinceName LIKE :province')
36
            ->orWhere('p.name LIKE :province')
37
            ->setParameter('province', '%' . $provinceName . '%')
38
            ->getQuery()
39
            ->getResult()
40
        ;
41
    }
42
43
    /**
44
     * @inheritdoc
45
     */
46
    public function findByPostcode(string $postcode): array
47
    {
48
        return $this->createQueryBuilder('o')
49
            ->andWhere('o.postcode LIKE :postcode')
50
            ->setParameter('postcode', '%' . $postcode . '%')
51
            ->getQuery()
52
            ->getResult()
53
        ;
54
    }
55
}
56