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 ( 78d09e...a6964a )
by Denis
02:46
created

App   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 53
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A buildAppXML() 0 8 1
A getAppProperties() 0 10 1
A getTotalTime() 0 4 1
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