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.

Issues (71)

src/Connectors/ApiKey.php (11 issues)

1
<?php
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace BristolSU\Service\Typeform\Connectors;
4
5
use BristolSU\Support\Connection\Contracts\Connector;
6
use FormSchema\Generator\Field;
7
use FormSchema\Schema\Form;
8
use GuzzleHttp\Exception\GuzzleException;
9
10
class ApiKey extends Connector
0 ignored issues
show
Missing doc comment for class ApiKey
Loading history...
11
{
12
13
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
Parameter $method should have a doc-comment as per coding-style.
Loading history...
Parameter $uri should have a doc-comment as per coding-style.
Loading history...
Parameter $options should have a doc-comment as per coding-style.
Loading history...
14
     * @inheritDoc
15
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
16 4
    public function request($method, $uri, array $options = [])
17
    {
18 4
        $options['base_uri'] = config('typeform_service.base_uri');
19 4
        $headers = ((isset($options['headers']) && is_array($options['headers']))?$options['headers']:[]);
20 4
        $headers['Authorization'] = 'Bearer ' . $this->getSetting('api_key');
21 4
        $options['headers'] = $headers;
22 4
        return $this->client->request($method, $uri, $options);
23
    }
24
25
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
26
     * @inheritDoc
27
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
28 2
    public function test(): bool
29
    {
30
        try {
31 2
            $this->request('get', '/me');
32 1
            return true;
33 1
        } catch (GuzzleException $e) {
34 1
            return false;
35
        }
36
    }
37
38
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
39
     * @inheritDoc
40
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
41 1
    static public function settingsSchema(): Form
42
    {
43 1
        return \FormSchema\Generator\Form::make()->withField(
44 1
            Field::input('api_key')->inputType('text')->label('API Key')
45 1
                ->description('You should be able to find this on Typeform')->required(true)
46 1
        )->getSchema();
47
    }
48
}