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.

ShapingParser::parse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace UCD\Infrastructure\Repository\CharacterRepository\XMLRepository\ElementParser\Properties;
4
5
use UCD\Unicode\Character\Properties\Shaping;
6
use UCD\Unicode\Character\Properties\Shaping\Joining;
7
use UCD\Unicode\Character\Properties\Shaping\JoiningGroup;
8
use UCD\Unicode\Character\Properties\Shaping\JoiningType;
9
10
class ShapingParser extends BaseParser
11
{
12
    const ATTR_JOINING_GROUP = 'jg';
13
    const ATTR_JOINING_TYPE = 'jt';
14
    const ATTR_JOIN_CONTROL = 'Join_C';
15
16
    /**
17
     * @return mixed
18
     */
19
    protected function parse()
20
    {
21
        $joining = $this->parseJoining();
22
23
        return new Shaping($joining);
24
    }
25
26
    /**
27
     * @return Joining
28
     */
29
    private function parseJoining()
30
    {
31
        $joiningGroup = new JoiningGroup($this->getAttribute(self::ATTR_JOINING_GROUP));
32
        $joiningType = new JoiningType($this->getAttribute(self::ATTR_JOINING_TYPE));
33
        $joinControl = $this->getBoolAttribute(self::ATTR_JOIN_CONTROL);
34
35
        return new Joining($joiningGroup, $joiningType, $joinControl);
36
    }
37
}