1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of PHP CS Fixer. |
5
|
|
|
* |
6
|
|
|
* (c) Fabien Potencier <[email protected]> |
7
|
|
|
* Dariusz Rumiński <[email protected]> |
8
|
|
|
* |
9
|
|
|
* This source file is subject to the MIT license that is bundled |
10
|
|
|
* with this source code in the file LICENSE. |
11
|
|
|
*/ |
12
|
|
|
|
13
|
|
|
namespace Etrias\PaazlConnector\SoapTypes; |
14
|
|
|
|
15
|
|
View Code Duplication |
class NonNegativeIntegerRangeType |
|
|
|
|
16
|
|
|
{ |
17
|
|
|
/** |
18
|
|
|
* @var nonNegativeInteger |
19
|
|
|
*/ |
20
|
|
|
protected $lowerBound = null; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @var nonNegativeInteger |
24
|
|
|
*/ |
25
|
|
|
protected $upperBound = null; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* Constructor. |
29
|
|
|
* |
30
|
|
|
* @var nonNegativeInteger |
31
|
|
|
* @var nonNegativeInteger $upperBound |
32
|
|
|
* |
33
|
|
|
* @param mixed $lowerBound |
34
|
|
|
* @param mixed $upperBound |
35
|
|
|
*/ |
36
|
|
|
public function __construct($lowerBound, $upperBound) |
37
|
|
|
{ |
38
|
|
|
$this->lowerBound = $lowerBound; |
|
|
|
|
39
|
|
|
$this->upperBound = $upperBound; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @return nonNegativeInteger |
44
|
|
|
*/ |
45
|
|
|
public function getLowerBound() |
46
|
|
|
{ |
47
|
|
|
return $this->lowerBound; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @param nonNegativeInteger $lowerBound |
52
|
|
|
* |
53
|
|
|
* @return $this |
54
|
|
|
*/ |
55
|
|
|
public function setLowerBound($lowerBound) |
56
|
|
|
{ |
57
|
|
|
$this->lowerBound = $lowerBound; |
58
|
|
|
|
59
|
|
|
return $this; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @return nonNegativeInteger |
64
|
|
|
*/ |
65
|
|
|
public function getUpperBound() |
66
|
|
|
{ |
67
|
|
|
return $this->upperBound; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @param nonNegativeInteger $upperBound |
72
|
|
|
* |
73
|
|
|
* @return $this |
74
|
|
|
*/ |
75
|
|
|
public function setUpperBound($upperBound) |
76
|
|
|
{ |
77
|
|
|
$this->upperBound = $upperBound; |
78
|
|
|
|
79
|
|
|
return $this; |
80
|
|
|
} |
81
|
|
|
} |
82
|
|
|
|
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.