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.

Iis::generate()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 20
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 14
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 20
ccs 14
cts 14
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 13
nc 2
nop 0
crap 2
1
<?php
2
3
namespace Talal\Exporter\Output;
4
5
class Iis extends Output
6
{
7
    /**
8
     * @inheritdoc
9
     */
10 3
    public function generate() : string
11
    {
12 3
        $xml = new \XMLWriter;
13 3
        $xml->openMemory();
14 3
        $xml->setIndent(true);
15 3
        $xml->setIndentString(sprintf("\t"));
16
17 3
        $xml->startElement('environmentVariables');
18
19 3
        foreach ($this->keys as $key => $match) {
20 3
            $xml->startElement('environmentVariable');
21 3
            $xml->writeAttribute('name', $match);
22 3
            $xml->writeAttribute('value', $this->values[$key]);
23 3
            $xml->endElement();
24 3
        }
25
26 3
        $xml->endElement();
27
28 3
        return trim($xml->outputMemory());
29
    }
30
}
31