XmlResponse   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 4 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