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
Push — master ( 61bf69...3a1917 )
by Nicholas
03:32
created

GeneralCategoryNotFoundException::withCategory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace UCD\Unicode\Character\Repository;
4
5
use UCD\Exception;
6
use UCD\Unicode\Character\Properties\General\GeneralCategory;
7
8
class GeneralCategoryNotFoundException extends Exception
9
{
10
    /**
11
     * @var GeneralCategory
12
     */
13
    protected $category;
14
15
    /**
16
     * @return GeneralCategory
17
     */
18
    public function getCategory()
19
    {
20
        return $this->category;
21
    }
22
23
    /**
24
     * @param GeneralCategory $category
25
     * @return self
26
     */
27
    public static function withCategory(GeneralCategory $category)
28
    {
29
        $exception = new self();
30
        $exception->category = $category;
31
32
        return $exception;
33
    }
34
}