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.

IntegrationTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 21
c 1
b 0
f 0
wmc 3
lcom 0
cbo 2
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createProvider() 0 4 1
A getCacheDir() 0 4 1
A getApiKey() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Geocoder package.
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license    MIT License
11
 */
12
13
namespace Geocoder\Provider\GeoPlugin\Tests;
14
15
use Geocoder\IntegrationTest\ProviderIntegrationTest;
16
use Geocoder\Provider\GeoPlugin\GeoPlugin;
17
use Http\Client\HttpClient;
18
19
/**
20
 * @author Tobias Nyholm <[email protected]>
21
 */
22
class IntegrationTest extends ProviderIntegrationTest
23
{
24
    protected $testAddress = false;
25
26
    protected $testReverse = false;
27
28
    protected function createProvider(HttpClient $httpClient)
29
    {
30
        return new GeoPlugin($httpClient, $this->getApiKey());
0 ignored issues
show
Bug introduced by
It seems like $this->getApiKey() targeting Geocoder\Provider\GeoPlu...rationTest::getApiKey() can also be of type string; however, Geocoder\Http\Provider\A...Provider::__construct() does only seem to accept null|object<Http\Message\MessageFactory>, maybe add an additional type check?

This check looks at variables that are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
31
    }
32
33
    protected function getCacheDir()
34
    {
35
        return __DIR__.'/.cached_responses';
36
    }
37
38
    protected function getApiKey()
39
    {
40
        return null;
41
    }
42
}
43