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.

Message   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A archive() 0 4 1
A unarchive() 0 4 1
1
<?php  namespace Rossedman\Teamwork;
2
3
use Rossedman\Teamwork\Traits\RestfulTrait;
4
5
class Message extends AbstractObject {
6
7
    use RestfulTrait;
8
9
    protected $wrapper  = 'post';
10
11
    protected $endpoint = 'posts';
12
13
    /**
14
     * Create Message
15
     * POST /projects/{project_id}/posts.json
16
     *
17
     * The RestfulTrait must be overwritten because messages
18
     * require a project to be associated with.
19
     *
20
     * $teamwork->message($projectID)->create([$data]);
21
     *
22
     * @retun mixed
23
     */
24
    public function create($data)
25
    {
26
        return $this->client->post("projects/$this->id/posts", [$this->wrapper => $data])->response();
27
    }
28
29
    /**
30
     * Archive Message
31
     * PUT /messages/{id}/archive.json
32
     */
33
    public function archive()
34
    {
35
        return $this->client->put("messages/$this->id/archive")->response();
36
    }
37
38
    /**
39
     * Unarchive Message
40
     * PUT /messages/{id}/unarchive.json
41
     */
42
    public function unarchive()
43
    {
44
        return $this->client->put("messages/$this->id/unarchive")->response();
45
    }
46
47
}