Completed
Push — ws-security ( defbc5...87c9bd )
by Asmir
86:42 queued 56:41
created

AttributedStringType::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext;
4
5
/**
6
 * Class representing AttributedStringType
7
 *
8
 * This type represents an element with arbitrary attributes.
9
 * XSD Type: AttributedString
10
 */
11 View Code Duplication
class AttributedStringType
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
14
    /**
15
     * @property string $__value
16
     */
17
    private $__value = null;
18
19
    /**
20
     * @property string $id
21
     */
22
    private $id = null;
23
24
    /**
25
     * Construct
26
     *
27
     * @param string $value
28
     */
29
    public function __construct($value)
30
    {
31
        $this->value($value);
32
    }
33
34
    /**
35
     * Gets or sets the inner value
36
     *
37
     * @param string $value
0 ignored issues
show
Bug introduced by
There is no parameter named $value. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
38
     * @return string
39
     */
40
    public function value()
41
    {
42
        if ($args = func_get_args()) {
43
            $this->__value = $args[0];
44
        }
45
        return $this->__value;
46
    }
47
48
    /**
49
     * Gets a string value
50
     *
51
     * @return string
52
     */
53
    public function __toString()
54
    {
55
        return strval($this->__value);
56
    }
57
58
    /**
59
     * Gets as id
60
     *
61
     * @return string
62
     */
63
    public function getId()
64
    {
65
        return $this->id;
66
    }
67
68
    /**
69
     * Sets a new id
70
     *
71
     * @param string $id
72
     * @return self
73
     */
74
    public function setId($id)
75
    {
76
        $this->id = $id;
77
        return $this;
78
    }
79
80
81
}
82
83