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 ( 490df9...5ffbde )
by Christian
01:33
created

CitySearchBuilder::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * (c) Christian Gripp <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Core23\SetlistFm\Builder;
11
12
final class CitySearchBuilder
13
{
14
    /**
15
     * @var array
16
     */
17
    private $query;
18
19
    private function __construct()
20
    {
21
        $this->query = [];
22
23
        $this->page(1);
24
    }
25
26
    /**
27
     * @return CitySearchBuilder
28
     */
29
    public static function create(): self
30
    {
31
        return new static();
32
    }
33
34
    /**
35
     * @param int $page
36
     *
37
     * @return CitySearchBuilder
38
     */
39
    public function page(int $page): self
40
    {
41
        $this->query['p'] = $page;
42
43
        return $this;
44
    }
45
46
    /**
47
     * @param string $name
48
     *
49
     * @return CitySearchBuilder
50
     */
51
    public function withName(string $name): self
52
    {
53
        $this->query['name'] = $name;
54
55
        return $this;
56
    }
57
58
    /**
59
     * @param string $country
60
     *
61
     * @return CitySearchBuilder
62
     */
63
    public function withCountry(string $country): self
64
    {
65
        $this->query['country'] = $country;
66
67
        return $this;
68
    }
69
70
    /**
71
     * @param string $name
72
     *
73
     * @return CitySearchBuilder
74
     */
75
    public function withState(string $name): self
76
    {
77
        $this->query['state'] = $name;
78
79
        return $this;
80
    }
81
82
    /**
83
     * @param string $code
84
     *
85
     * @return CitySearchBuilder
86
     */
87
    public function withStateCode(string $code): self
88
    {
89
        $this->query['stateCode'] = $code;
90
91
        return $this;
92
    }
93
94
    /**
95
     * @return array
96
     */
97
    public function getQuery(): array
98
    {
99
        return $this->query;
100
    }
101
}
102