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.

Time::edit()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Ciromattia\Teamwork;
4
5
use Ciromattia\Teamwork\Traits\RestfulTrait;
6
7
class Time extends TeamworkObject
8
{
9
    use RestfulTrait;
10
11
    protected $wrapper = 'time-entry';
12
    protected $endpoint = 'time_entries';
13
14
    /**
15
     * GET /time_entries.json
16
     *
17
     * @return mixed
18
     */
19
    public function all($args = null, $fullResponse = false)
20
    {
21
        $this->areArgumentsValid($args, ['page', 'pageSize']);
22
23
        return $this->client->get($this->endpoint, $args)->response($fullResponse);
24
    }
25
26
    /**
27
     * GET /time_entries/id.json
28
     *
29
     * @return mixed
30
     */
31
    public function find($args = null)
32
    {
33
        $this->areArgumentsValid($args, ['page', 'pageSize']);
34
35
        return $this->client->get("$this->endpoint/$this->id.json", $args)->response();
36
    }
37
38
    /**
39
     * Edit A Time entry
40
     * PUT /time_entries/{id}.json
41
     *
42
     * @return mixed
43
     */
44
    public function edit($data)
45
    {
46
        return $this->client->put("$this->endpoint/$this->id.json", ['time-entry' => $data])->response();
47
    }
48
49
    /**
50
     * Delete A Time entry
51
     * DELETE /time_entries/{id}.json
52
     *
53
     * @return mixed
54
     */
55
    public function delete()
56
    {
57
        return $this->client->delete("$this->endpoint/$this->id.json")->response();
58
    }
59
}
60