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.

App::buildAppXML()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Ellumilel\DocProps;
3
4
/**
5
 * @todo more Properties
6
 * @link https://msdn.microsoft.com/en-us/library/bb264572(v=office.12).aspx
7
 *
8
 * Class App
9
 * @package Ellumilel\DocProps
10
 * @author Denis Tikhonov <[email protected]>
11
 */
12
class App
13
{
14
    /** @var string */
15
    private $xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
16
    /** @var string */
17
    private $urlSchemaFormat = 'http://schemas.openxmlformats.org/officeDocument/2006';
18
    /** @var int */
19
    private $totalTime = 0;
20
21
    /**
22
     * App constructor.
23
     *
24
     * @param int $totalTime
25
     */
26
    public function __construct($totalTime = 0)
27
    {
28
        $this->totalTime = $totalTime;
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function buildAppXML()
35
    {
36
        $appXml = '';
37
        $appXml .= $this->xml;
38
        $appXml .= $this->getAppProperties();
39
40
        return $appXml;
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    private function getAppProperties()
47
    {
48
        $properties = '<Properties xmlns="'.
49
            $this->urlSchemaFormat.'/extended-properties" xmlns:vt="'.
50
            $this->urlSchemaFormat.'/docPropsVTypes">';
51
        $properties .= $this->getTotalTime();
52
        $properties .= '</Properties>';
53
54
        return $properties;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    private function getTotalTime()
61
    {
62
        return '<TotalTime>'.$this->totalTime.'</TotalTime>';
63
    }
64
}
65