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

AttributedURIType::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 0
Metric Value
dl 5
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility;
4
5
/**
6
 * Class representing AttributedURIType
7
 *
8
 * This type is for elements whose [children] is an anyURI and can have arbitrary
9
 * attributes.
10
 * XSD Type: AttributedURI
11
 */
12 View Code Duplication
class AttributedURIType
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...
13
{
14
15
    /**
16
     * @property string $__value
17
     */
18
    private $__value = null;
19
20
    /**
21
     * @property string $id
22
     */
23
    private $id = null;
24
25
    /**
26
     * Construct
27
     *
28
     * @param string $value
29
     */
30
    public function __construct($value)
31
    {
32
        $this->value($value);
33
    }
34
35
    /**
36
     * Gets or sets the inner value
37
     *
38
     * @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...
39
     * @return string
40
     */
41
    public function value()
42
    {
43
        if ($args = func_get_args()) {
44
            $this->__value = $args[0];
45
        }
46
        return $this->__value;
47
    }
48
49
    /**
50
     * Gets a string value
51
     *
52
     * @return string
53
     */
54
    public function __toString()
55
    {
56
        return strval($this->__value);
57
    }
58
59
    /**
60
     * Gets as id
61
     *
62
     * @return string
63
     */
64
    public function getId()
65
    {
66
        return $this->id;
67
    }
68
69
    /**
70
     * Sets a new id
71
     *
72
     * @param string $id
73
     * @return self
74
     */
75
    public function setId($id)
76
    {
77
        $this->id = $id;
78
        return $this;
79
    }
80
81
82
}
83
84