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::subtitleLimitExceeded()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 1 Features 2
Metric Value
c 2
b 1
f 2
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
crap 2
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