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.

VenueSearchBuilder   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 97
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 10
lcom 1
cbo 0
dl 0
loc 97
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A withCityId() 0 6 1
A create() 0 4 1
A page() 0 6 1
A withName() 0 6 1
A withCity() 0 6 1
A withCountry() 0 6 1
A withState() 0 6 1
A withStateCode() 0 6 1
A getQuery() 0 4 1
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 VenueSearchBuilder
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 VenueSearchBuilder
28
     */
29
    public static function create(): self
30
    {
31
        return new static();
32
    }
33
34
    /**
35
     * @return VenueSearchBuilder
36
     */
37
    public function page(int $page): self
38
    {
39
        $this->query['p'] = $page;
40
41
        return $this;
42
    }
43
44
    /**
45
     * @return VenueSearchBuilder
46
     */
47
    public function withName(string $name): self
48
    {
49
        $this->query['name'] = $name;
50
51
        return $this;
52
    }
53
54
    /**
55
     * @return VenueSearchBuilder
56
     */
57
    public function withCity(string $name): self
58
    {
59
        $this->query['cityName'] = $name;
60
61
        return $this;
62
    }
63
64
    /**
65
     * @return VenueSearchBuilder
66
     */
67
    public function withCityId(int $id): self
68
    {
69
        $this->query['cityId'] = $id;
70
71
        return $this;
72
    }
73
74
    /**
75
     * @return VenueSearchBuilder
76
     */
77
    public function withCountry(string $country): self
78
    {
79
        $this->query['country'] = $country;
80
81
        return $this;
82
    }
83
84
    /**
85
     * @return VenueSearchBuilder
86
     */
87
    public function withState(string $name): self
88
    {
89
        $this->query['state'] = $name;
90
91
        return $this;
92
    }
93
94
    /**
95
     * @return VenueSearchBuilder
96
     */
97
    public function withStateCode(string $code): self
98
    {
99
        $this->query['stateCode'] = $code;
100
101
        return $this;
102
    }
103
104
    public function getQuery(): array
105
    {
106
        return $this->query;
107
    }
108
}
109