@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * Creates a new circle by its center point and radius. |
| 17 | 17 | * |
| 18 | - * @param Point|float[] $center the center point |
|
| 18 | + * @param null|Point $center the center point |
|
| 19 | 19 | * @param float $radius radius of the circle |
| 20 | 20 | * @return Circle |
| 21 | 21 | */ |
@@ -35,6 +35,10 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | |
| 38 | + /** |
|
| 39 | + * @param Point $center |
|
| 40 | + * @param double $radius |
|
| 41 | + */ |
|
| 38 | 42 | private function __construct($center, $radius) |
| 39 | 43 | { |
| 40 | 44 | $this->center = $center; |
@@ -80,6 +80,9 @@ discard block |
||
| 80 | 80 | return $json; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | + /** |
|
| 84 | + * @param string $json |
|
| 85 | + */ |
|
| 83 | 86 | private static function jsonDecode($json) |
| 84 | 87 | { |
| 85 | 88 | $value = json_decode($json); |
@@ -89,6 +92,9 @@ discard block |
||
| 89 | 92 | return $value; |
| 90 | 93 | } |
| 91 | 94 | |
| 95 | + /** |
|
| 96 | + * @return string|null |
|
| 97 | + */ |
|
| 92 | 98 | private static function getJsonErrorMsg() |
| 93 | 99 | { |
| 94 | 100 | if (PHP_VERSION_ID >= 50500) { |
@@ -17,8 +17,8 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * Creates a new line segment from its start and end point, each as either a {@link Point} or a pair of coordinates. |
| 19 | 19 | * |
| 20 | - * @param Point|float[] $start |
|
| 21 | - * @param Point|float[] $end |
|
| 20 | + * @param null|Point $start |
|
| 21 | + * @param null|Point $end |
|
| 22 | 22 | * @return LineSegment |
| 23 | 23 | */ |
| 24 | 24 | public static function fromEndpoints($start, $end) |
@@ -39,6 +39,10 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param Point $start |
|
| 44 | + * @param Point $end |
|
| 45 | + */ |
|
| 42 | 46 | private function __construct($start, $end) |
| 43 | 47 | { |
| 44 | 48 | $this->start = $start; |
@@ -56,6 +56,9 @@ |
||
| 56 | 56 | return new MacAddr($canon); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param string $canonAddr |
|
| 61 | + */ |
|
| 59 | 62 | private function __construct($canonAddr) |
| 60 | 63 | { |
| 61 | 64 | $this->canonAddr = $canonAddr; |
@@ -68,6 +68,9 @@ |
||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
| 71 | + /** |
|
| 72 | + * @param Decimal $amount |
|
| 73 | + */ |
|
| 71 | 74 | private function __construct($amount, $unit) |
| 72 | 75 | { |
| 73 | 76 | $this->amount = $amount; |
@@ -59,6 +59,9 @@ |
||
| 59 | 59 | return new Path($normalized, $isOpen); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | + /** |
|
| 63 | + * @param boolean $isOpen |
|
| 64 | + */ |
|
| 62 | 65 | private function __construct($points, $isOpen) |
| 63 | 66 | { |
| 64 | 67 | $this->points = $points; |
@@ -37,6 +37,10 @@ |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @param double $x |
|
| 42 | + * @param double $y |
|
| 43 | + */ |
|
| 40 | 44 | private function __construct($x, $y) |
| 41 | 45 | { |
| 42 | 46 | $this->x = $x; |
@@ -97,6 +97,10 @@ discard block |
||
| 97 | 97 | return new Quantity($val, $unit); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | + /** |
|
| 101 | + * @param string $value |
|
| 102 | + * @param string $unit |
|
| 103 | + */ |
|
| 100 | 104 | public static function fromValue($value, $unit = null) |
| 101 | 105 | { |
| 102 | 106 | if (!is_numeric($value)) { |
@@ -135,7 +139,7 @@ discard block |
||
| 135 | 139 | /** |
| 136 | 140 | * @param Quantity|string $quantity quantity to compare this quantity with; |
| 137 | 141 | * if Quantity is not given, {@link Quantity::fromString()} is used to parse it |
| 138 | - * @return bool whether the two quantities are comparable and of equal value (after converting to the same unit if |
|
| 142 | + * @return null|boolean whether the two quantities are comparable and of equal value (after converting to the same unit if |
|
| 139 | 143 | * convertible) |
| 140 | 144 | */ |
| 141 | 145 | public function equals($quantity) |
@@ -84,6 +84,9 @@ |
||
| 84 | 84 | return self::fromList($tokens); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | + /** |
|
| 88 | + * @param string $str |
|
| 89 | + */ |
|
| 87 | 90 | private static function tokenize($str) |
| 88 | 91 | { |
| 89 | 92 | preg_match_all('~[^\s\']+|\'(?:[^\']+|\'\')*\'~', $str, $matches); |