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 (#10)
by
unknown
02:43
created

CouldNotCreateCard   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 1 Features 2
Metric Value
wmc 3
c 2
b 1
f 2
lcom 1
cbo 0
dl 0
loc 41
ccs 0
cts 18
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A titleNotProvided() 0 4 1
A titleLimitExceeded() 0 8 1
A subtitleLimitExceeded() 0 8 1
1
<?php
2
3
namespace NotificationChannels\Facebook\Exceptions;
4
5
class CouldNotCreateCard extends \Exception
6
{
7
    /**
8
     * Thrown when the button title is not provided.
9
     *
10
     * @return static
11
     */
12
    public static function titleNotProvided()
13
    {
14
        return new static('Button title was not provided, A 20 character limited title should be provided.');
15
    }
16
17
    /**
18
     * Thrown when the title characters limit is exceeded.
19
     *
20
     * @return static
21
     */
22
    public static function titleLimitExceeded($title)
23
    {
24
        $count = mb_strlen($title);
25
26
        return new static(
27
            "Your title was {$count} characters long, which exceeds the 80 character limit"
28
        );
29
    }
30
31
    /**
32
     * Thrown when the subtitle characters limit is exceeded.
33
     *
34
     * @return static
35
     */
36
    public static function subtitleLimitExceeded($title)
37
    {
38
        $count = mb_strlen($title);
39
40
        return new static(
41
            "Your subtitle was {$count} characters long, which exceeds the 80 character limit"
42
        );
43
    }
44
45
}
46