@@ -56,6 +56,10 @@ |
||
| 56 | 56 | return self::fromParts($parts[0], $parts[1], $xipList); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param integer $xmin |
|
| 61 | + * @param integer $xmax |
|
| 62 | + */ |
|
| 59 | 63 | private function __construct($xmin, $xmax, $xipList) |
| 60 | 64 | { |
| 61 | 65 | $this->xmin = $xmin; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | throw new \InvalidArgumentException('Invalid syntax of hstore value'); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - $k = ($m[2][0] ? : $this->unescapeAtom($m[1][0])); |
|
| 39 | + $k = ($m[2][0] ?: $this->unescapeAtom($m[1][0])); |
|
| 40 | 40 | $v = (!empty($m[4][0]) ? null : (!empty($m[5][0]) ? $m[5][0] : $this->unescapeAtom($m[3][0]))); |
| 41 | 41 | $result[$k] = $v; |
| 42 | 42 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | public function defineTypeAlias(string $alias, string $schemaName, string $typeName) |
| 63 | 63 | { |
| 64 | - $this->nameTypeMap[$alias] =& $this->qualNameTypeMap[$schemaName][$typeName]; |
|
| 64 | + $this->nameTypeMap[$alias] = & $this->qualNameTypeMap[$schemaName][$typeName]; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | foreach ($this->typeSearchPath as $schemaName) { |
| 92 | 92 | foreach (($this->qualNameTypeMap[$schemaName] ?? []) as $typeName => $converter) { |
| 93 | 93 | if (!isset($this->searchedNameCache[$typeName])) { |
| 94 | - $this->searchedNameCache[$typeName] =& $this->qualNameTypeMap[$schemaName][$typeName]; |
|
| 94 | + $this->searchedNameCache[$typeName] = & $this->qualNameTypeMap[$schemaName][$typeName]; |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | /** |
| 167 | - * @param IConnection|string $conn (name of) connection to use as the default connection |
|
| 167 | + * @param IConnection $conn (name of) connection to use as the default connection |
|
| 168 | 168 | * @throws \RuntimeException if the requested connection is not defined |
| 169 | 169 | */ |
| 170 | 170 | public static function useConnectionAsDefault($conn) |
@@ -45,6 +45,10 @@ |
||
| 45 | 45 | |
| 46 | 46 | private $dateStyleRetriever; |
| 47 | 47 | |
| 48 | + /** |
|
| 49 | + * @param string $schemaName |
|
| 50 | + * @param string $name |
|
| 51 | + */ |
|
| 48 | 52 | public function __construct($schemaName, $name, IConnection $connection) |
| 49 | 53 | { |
| 50 | 54 | parent::__construct($schemaName, $name, $connection); |
@@ -10,9 +10,9 @@ |
||
| 10 | 10 | * plain array of matches, but an extended array: each item is a pair of the matching portion of the needle and the |
| 11 | 11 | * byte offset to the subject, like {@link preg_match_all()} does with the `PREG_OFFSET_CAPTURE` flag. |
| 12 | 12 | * |
| 13 | - * @param string|string[] $pattern |
|
| 13 | + * @param string $pattern |
|
| 14 | 14 | * @param callable $callback |
| 15 | - * @param string|string[] $subject |
|
| 15 | + * @param string $subject |
|
| 16 | 16 | * @param int $limit |
| 17 | 17 | * @param int|null $count |
| 18 | 18 | * @return string|string[] depending on whether <tt>$subject</tt> is <tt>string</tt> or <tt>array</tt>, |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | callable $callback, |
| 24 | 24 | $subject, |
| 25 | 25 | int $limit = -1, |
| 26 | - int &$count = null |
|
| 26 | + int & $count = null |
|
| 27 | 27 | ) |
| 28 | 28 | { |
| 29 | 29 | if (is_array($subject)) { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | callable $callback, |
| 43 | 43 | string $subject, |
| 44 | 44 | int $limit = -1, |
| 45 | - int &$count = null |
|
| 45 | + int & $count = null |
|
| 46 | 46 | ): string |
| 47 | 47 | { |
| 48 | 48 | if (is_array($pattern)) { |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | 85 | * @param mixed $other |
| 86 | - * @return bool whether this and the other composite value are of the identical type and contain the same data |
|
| 86 | + * @return null|boolean whether this and the other composite value are of the identical type and contain the same data |
|
| 87 | 87 | */ |
| 88 | 88 | public function equals($other) |
| 89 | 89 | { |
@@ -254,8 +254,8 @@ discard block |
||
| 254 | 254 | * which might or might not be desired. Such a difference only arises in the trailing fractional zero digits, |
| 255 | 255 | * though. |
| 256 | 256 | * |
| 257 | - * @param string|int|float|Decimal|object $number number to compare this number with |
|
| 258 | - * @return bool whether this number numerically equals to <tt>$number</tt> |
|
| 257 | + * @param Decimal|null $number number to compare this number with |
|
| 258 | + * @return null|boolean whether this number numerically equals to <tt>$number</tt> |
|
| 259 | 259 | */ |
| 260 | 260 | public function equals($number) |
| 261 | 261 | { |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | /** |
| 278 | - * @param string|int|float|Decimal|object $number |
|
| 278 | + * @param Decimal $number |
|
| 279 | 279 | * @return bool <tt>true</tt> iff this number is numerically greater than <tt>$number</tt> |
| 280 | 280 | */ |
| 281 | 281 | public function greaterThan($number) |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | /** |
| 315 | - * @return bool whether this is zero |
|
| 315 | + * @return null|boolean whether this is zero |
|
| 316 | 316 | */ |
| 317 | 317 | public function isZero() |
| 318 | 318 | { |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | /** |
| 363 | - * @param string|int|float|Decimal|object $augend |
|
| 363 | + * @param integer $augend |
|
| 364 | 364 | * @return Decimal a new decimal number, representing the result of sum of this and the given number |
| 365 | 365 | */ |
| 366 | 366 | public function add($augend) |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 | /** |
| 380 | - * @param string|int|float|Decimal|object $subtrahend |
|
| 380 | + * @param Decimal $subtrahend |
|
| 381 | 381 | * @return Decimal a new decimal number, representing the result of subtraction of this and the given number |
| 382 | 382 | */ |
| 383 | 383 | public function subtract($subtrahend) |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | /** |
| 397 | - * @param string|int|float|Decimal|object $multiplicand |
|
| 397 | + * @param Decimal $multiplicand |
|
| 398 | 398 | * @return Decimal a new decimal number, representing the result of multiplication of this and the given number |
| 399 | 399 | */ |
| 400 | 400 | public function multiply($multiplicand) |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | /** |
| 414 | - * @param string|int|float|Decimal|object $divisor |
|
| 414 | + * @param Decimal $divisor |
|
| 415 | 415 | * @return Decimal a new decimal number, representing the result of division of this number with the given number |
| 416 | 416 | * @throws \RuntimeException if <tt>$divisor</tt> is zero |
| 417 | 417 | */ |
@@ -166,6 +166,9 @@ discard block |
||
| 166 | 166 | return new Range($subtype, null, true, null, null, null, null); |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | + /** |
|
| 170 | + * @param boolean $upperInc |
|
| 171 | + */ |
|
| 169 | 172 | private static function processBoundSpec($boundsOrLowerInc = '[)', $upperInc = null) |
| 170 | 173 | { |
| 171 | 174 | if (is_string($boundsOrLowerInc)) { |
@@ -192,6 +195,10 @@ discard block |
||
| 192 | 195 | } |
| 193 | 196 | |
| 194 | 197 | |
| 198 | + /** |
|
| 199 | + * @param IRangeCanonicalFunc|null $canonicalFunc |
|
| 200 | + * @param boolean $empty |
|
| 201 | + */ |
|
| 195 | 202 | private function __construct( |
| 196 | 203 | ITotallyOrderedType $subtype, |
| 197 | 204 | $canonicalFunc, |
@@ -374,7 +381,7 @@ discard block |
||
| 374 | 381 | |
| 375 | 382 | /** |
| 376 | 383 | * @param mixed $element a value of the range subtype |
| 377 | - * @return bool whether this range contains the given element; |
|
| 384 | + * @return null|boolean whether this range contains the given element; |
|
| 378 | 385 | * <tt>null</tt> on <tt>null</tt> input |
| 379 | 386 | */ |
| 380 | 387 | public function containsElement($element) |
@@ -405,7 +412,7 @@ discard block |
||
| 405 | 412 | |
| 406 | 413 | /** |
| 407 | 414 | * @param mixed $element value of the range subtype |
| 408 | - * @return bool <tt>true</tt> iff this range is left of the given element - value of the range subtype; |
|
| 415 | + * @return null|boolean <tt>true</tt> iff this range is left of the given element - value of the range subtype; |
|
| 409 | 416 | * <tt>false</tt> otherwise, especially if this range is empty; |
| 410 | 417 | * <tt>null</tt> on <tt>null</tt> input |
| 411 | 418 | */ |
@@ -427,7 +434,7 @@ discard block |
||
| 427 | 434 | |
| 428 | 435 | /** |
| 429 | 436 | * @param mixed $element value of the range subtype |
| 430 | - * @return bool <tt>true</tt> iff this range is right of the given element - value of the range subtype; |
|
| 437 | + * @return null|boolean <tt>true</tt> iff this range is right of the given element - value of the range subtype; |
|
| 431 | 438 | * <tt>false</tt> otherwise, especially if this range is empty; |
| 432 | 439 | * <tt>null</tt> on <tt>null</tt> input |
| 433 | 440 | */ |
@@ -449,7 +456,7 @@ discard block |
||
| 449 | 456 | |
| 450 | 457 | /** |
| 451 | 458 | * @param Range $other a range of the same subtype as this range |
| 452 | - * @return bool whether this range entirely contains the other range; |
|
| 459 | + * @return null|boolean whether this range entirely contains the other range; |
|
| 453 | 460 | * an empty range is considered to be contained in any range, even an empty one; |
| 454 | 461 | * <tt>null</tt> on <tt>null</tt> input |
| 455 | 462 | */ |
@@ -495,7 +502,7 @@ discard block |
||
| 495 | 502 | |
| 496 | 503 | /** |
| 497 | 504 | * @param Range $other a range of the same subtype as this range |
| 498 | - * @return bool whether this range is entirely contained in the other range; |
|
| 505 | + * @return null|boolean whether this range is entirely contained in the other range; |
|
| 499 | 506 | * an empty range is considered to be contained in any range, even an empty one; |
| 500 | 507 | * <tt>null</tt> on <tt>null</tt> input |
| 501 | 508 | */ |
@@ -512,7 +519,7 @@ discard block |
||
| 512 | 519 | |
| 513 | 520 | /** |
| 514 | 521 | * @param Range $other a range of the same subtype as this range |
| 515 | - * @return bool whether this and the other range overlap, i.e., have a non-empty intersection; |
|
| 522 | + * @return null|boolean whether this and the other range overlap, i.e., have a non-empty intersection; |
|
| 516 | 523 | * <tt>null</tt> on <tt>null</tt> input |
| 517 | 524 | */ |
| 518 | 525 | public function overlaps($other) |
@@ -618,7 +625,7 @@ discard block |
||
| 618 | 625 | |
| 619 | 626 | /** |
| 620 | 627 | * @param Range|null $other a range of the same subtype as this range |
| 621 | - * @return bool <tt>true</tt> iff this range is strictly left of the other range, i.e., it ends before the other |
|
| 628 | + * @return null|boolean <tt>true</tt> iff this range is strictly left of the other range, i.e., it ends before the other |
|
| 622 | 629 | * starts; |
| 623 | 630 | * <tt>false</tt> otherwise, especially if either range is empty; |
| 624 | 631 | * <tt>null</tt> on <tt>null</tt> input |
@@ -644,7 +651,7 @@ discard block |
||
| 644 | 651 | |
| 645 | 652 | /** |
| 646 | 653 | * @param Range|null $other a range of the same subtype as this range |
| 647 | - * @return bool <tt>true</tt> iff this range is strictly left of the other range, i.e., it ends before the other |
|
| 654 | + * @return null|boolean <tt>true</tt> iff this range is strictly left of the other range, i.e., it ends before the other |
|
| 648 | 655 | * starts; |
| 649 | 656 | * <tt>false</tt> otherwise, especially if either range is empty;; |
| 650 | 657 | * <tt>null</tt> on <tt>null</tt> input |