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.

Putio::friends()   A
last analyzed

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
namespace Mozammil\Putio;
4
5
use Mozammil\Putio\Http\Client;
6
use Mozammil\Putio\Endpoints\Zips;
7
use Mozammil\Putio\Endpoints\Feeds;
8
use Mozammil\Putio\Endpoints\Files;
9
use Mozammil\Putio\Endpoints\Account;
10
use Mozammil\Putio\Endpoints\Friends;
11
use Mozammil\Putio\Endpoints\Transfers;
12
13
class Putio
14
{
15
    /**
16
     * The Http client.
17
     *
18
     * @var \Mozammil\Putio\Http\Client
19
     */
20
    protected $client;
21
22
    /**
23
     * Initialises the HTTP client.
24
     *
25
     * @param string $token
26
     *
27
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
28
     */
29
    public function __construct(string $token)
30
    {
31
        $this->client = $this->client ?: new Client($token);
32
    }
33
34
    /**
35
     * Files instance.
36
     *
37
     * @return \Mozammil\Putio\Endpoints\Files
38
     */
39
    public function files()
40
    {
41
        return new Files($this->client);
42
    }
43
44
    /**
45
     * Transfers instance.
46
     *
47
     * @return \Mozammil\Putio\Endpoints\Transfers
48
     */
49
    public function transfers()
50
    {
51
        return new Transfers($this->client);
52
    }
53
54
    /**
55
     * Zips instance.
56
     *
57
     * @return \Mozammil\Putio\Endpoints\Zips
58
     */
59
    public function zips()
60
    {
61
        return new Zips($this->client);
62
    }
63
64
    /**
65
     * Feeds instance.
66
     *
67
     * @return \Mozammil\Putio\Endpoints\Feeds
68
     */
69
    public function feeds()
70
    {
71
        return new Feeds($this->client);
72
    }
73
74
    /**
75
     * Friends instance.
76
     *
77
     * @return \Mozammil\Putio\Endpoints\Friends
78
     */
79
    public function friends()
80
    {
81
        return new Friends($this->client);
82
    }
83
84
    /**
85
     * Account instance.
86
     *
87
     * @return \Mozammil\Putio\Endpoints\Account
88
     */
89
    public function account()
90
    {
91
        return new Account($this->client);
92
    }
93
}
94