1 | <?php |
||
9 | class Real implements ValueObjectInterface, NumberInterface |
||
10 | { |
||
11 | protected $value; |
||
12 | |||
13 | /** |
||
14 | * Returns a Real object given a PHP native float as parameter. |
||
15 | * |
||
16 | * @param float $value |
||
|
|||
17 | * @return static |
||
18 | */ |
||
19 | 4 | public static function fromNative() |
|
25 | |||
26 | /** |
||
27 | * Returns a Real object given a PHP native float as parameter. |
||
28 | * |
||
29 | * @param float $value |
||
30 | */ |
||
31 | 128 | public function __construct($value) |
|
41 | |||
42 | /** |
||
43 | * Returns the native value of the real number |
||
44 | * |
||
45 | * @return float |
||
46 | */ |
||
47 | 113 | public function toNative() |
|
51 | |||
52 | /** |
||
53 | * Tells whether two Real are equal by comparing their values |
||
54 | * |
||
55 | * @param ValueObjectInterface $real |
||
56 | * @return bool |
||
57 | */ |
||
58 | 11 | public function sameValueAs(ValueObjectInterface $real) |
|
66 | |||
67 | /** |
||
68 | * Returns the integer part of the Real number as a Integer |
||
69 | * |
||
70 | * @param RoundingMode $rounding_mode Rounding mode of the conversion. Defaults to RoundingMode::HALF_UP. |
||
71 | * @return Integer |
||
72 | */ |
||
73 | 2 | public function toInteger(RoundingMode $rounding_mode = null) |
|
85 | |||
86 | /** |
||
87 | * Returns the absolute integer part of the Real number as a Natural |
||
88 | * |
||
89 | * @param RoundingMode $rounding_mode Rounding mode of the conversion. Defaults to RoundingMode::HALF_UP. |
||
90 | * @return Natural |
||
91 | */ |
||
92 | 1 | public function toNatural(RoundingMode $rounding_mode = null) |
|
100 | |||
101 | /** |
||
102 | * Returns the string representation of the real value |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | 4 | public function __toString() |
|
110 | } |
||
111 |
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 methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.