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.
This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
19
{
20
/**
21
* Get the city data for an id.
22
*
23
* @param int $cityId
24
*
25
* @throws ApiException
26
* @throws NotFoundException
27
*
28
* @return City
29
*/
30
public function getCity(int $cityId): City
31
{
32
return City::fromApi(
33
$this->call('city/'.$cityId)
34
);
35
}
36
37
/**
38
* Search for cities. Returns cities sorted by relevance.
39
*
40
* @param array $fields
41
* @param int $page
42
*
43
* @throws ApiException
44
* @throws NotFoundException
45
*
46
* @return City[]
47
*/
48
public function search(array $fields, int $page = 1): array
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.