XmlResponse::getValue()   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
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
// Copyright 1999-2021. Plesk International GmbH.
3
4
namespace PleskX\Api;
5
6
/**
7
 * XML wrapper for responses.
8
 */
9
class XmlResponse extends \SimpleXMLElement
10
{
11
    /**
12
     * Retrieve value by node name.
13
     *
14
     * @param string $node
15
     *
16
     * @return string
17
     */
18
    public function getValue($node)
19
    {
20
        return (string) $this->xpath('//'.$node)[0];
21
    }
22
}
23