Completed
Pull Request — master (#34)
by Adam
09:18
created

Permissions::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace AcquiaCloudApi\Endpoints;
4
5
use AcquiaCloudApi\Connector\ClientInterface;
6
use AcquiaCloudApi\Response\PermissionsResponse;
7
8
/**
9
 * Class Permissions
10
 * @package AcquiaCloudApi\CloudApi
11
 */
12
class Permissions extends CloudApiBase implements CloudApiInterface
13
{
14
15
    /**
16
     * Show all available permissions.
17
     *
18
     * @return PermissionsResponse
19
     */
20
    public function get()
21
    {
22
        return new PermissionsResponse($this->client->request('get', '/permissions'));
0 ignored issues
show
Bug introduced by
It seems like $this->client->request('get', '/permissions') can also be of type object; however, parameter $permissions of AcquiaCloudApi\Response\...Response::__construct() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

22
        return new PermissionsResponse(/** @scrutinizer ignore-type */ $this->client->request('get', '/permissions'));
Loading history...
23
    }
24
}
25