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.
Completed
Pull Request — master (#35)
by Dwight
01:01
created

Video::setTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace NotificationChannels\FacebookPoster\Attachments;
4
5
class Video extends Attachment
6
{
7
    /**
8
     * The video title.
9
     *
10
     * @var string
11
     */
12
    protected $title;
13
14
    /**
15
     * The video description.
16
     *
17
     * @var string
18
     */
19
    protected $description;
20
21
    /**
22
     * The video API method.
23
     *
24
     * @var string
25
     */
26
    protected $apiMethod = 'videoToUpload';
27
28
    /**
29
     * Create a new video instance.
30
     *
31
     * @param  string  $path
32
     * @param  string  $title
33
     * @param  string  $description
34
     * @param  string  $apiEndpoint
35
     * @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...
36
     */
37 1
    public function __construct($path, $title = null, $description = null, $apiEndpoint)
38
    {
39 1
        $this->path = $path;
40 1
        $this->title = $title;
41 1
        $this->description = $description;
42 1
        $this->apiEndpoint = $apiEndpoint;
43 1
    }
44
45
    /**
46
     * Get additional attachment data.
47
     *
48
     * @return array
49
     */
50 1
    public function getData()
51
    {
52 1
        return array_filter([
53 1
            'title' => $this->title,
54 1
            'description' => $this->description,
55
        ]);
56
    }
57
}
58