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.

ComplementoBase::getNamespace()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the cfdi-xml project.
5
 *
6
 * (c) Kinedu
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Kinedu\CfdiXML\Common;
13
14
class ComplementoBase extends Node
15
{
16
    /** @var string */
17
    const SAT_URL = 'http://www.sat.gob.mx/';
18
19
    /** @var string */
20
    const SCHEMA_URL = 'http://www.sat.gob.mx/sitio_internet/cfd/%s/%s.xsd';
21
22
    /** @var string */
23
    protected $namespace;
24
25
    /** @var string */
26
    protected $namespaceKey;
27
28
    /** @var string */
29
    protected $schemaDefinition;
30
31
    /** @var bool */
32
    protected $globalSchemaLocation = true;
33
34
    public function getNamespace(): string
35
    {
36
        return self::SAT_URL.$this->namespace;
37
    }
38
39
    public function getSchemaLocation(): string
40
    {
41
        $schemaLocation = sprintf(
42
            self::SCHEMA_URL,
43
            $this->namespace,
44
            $this->schemaDefinition
45
        );
46
47
        return "{$this->getNamespace()} $schemaLocation";
48
    }
49
}
50