These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Cloudflare\User; |
||
4 | |||
5 | use Cloudflare\Api; |
||
6 | use Cloudflare\User; |
||
7 | |||
8 | /** |
||
9 | * CloudFlare API wrapper |
||
10 | * |
||
11 | * Invites |
||
12 | * |
||
13 | * @author James Bell <[email protected]> |
||
14 | * |
||
15 | * @version 1 |
||
16 | */ |
||
17 | class Invites extends Api |
||
18 | { |
||
19 | /** |
||
20 | * Default permissions level |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $permission_level = ['read' => '#invites:read', 'edit' => '#invites:edit']; |
||
25 | |||
26 | /** |
||
27 | * List invitations (permission needed: #invites:read) |
||
28 | * List all invitations associated with my user |
||
29 | */ |
||
30 | public function invites() |
||
31 | { |
||
32 | return $this->get('/user/invites'); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Invitation details (permission needed: #invites:read) |
||
37 | * Get the details of an invitation |
||
38 | * |
||
39 | * @param string $identifier |
||
40 | */ |
||
41 | public function details($identifier) |
||
42 | { |
||
43 | return $this->get('/user/invites/'.$identifier); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Respond to Invitation (permission needed: #invites:edit) |
||
48 | * Respond to an invitation |
||
49 | * |
||
50 | * @param string $identifier |
||
51 | * @param string $status Status of your response to the invitation (rejected or accepted) |
||
52 | */ |
||
53 | public function respond($identifier, $status) |
||
0 ignored issues
–
show
|
|||
54 | { |
||
55 | return $this->patch('/user/invites/'.$identifier); |
||
56 | } |
||
57 | } |
||
58 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.