@@ -44,11 +44,17 @@ discard block |
||
| 44 | 44 | ConflictChecker::check($this, $this->annotations); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | + /** |
|
| 48 | + * @param string $class |
|
| 49 | + */ |
|
| 47 | 50 | public function hasAnnotation($class) |
| 48 | 51 | { |
| 49 | 52 | return $this->annotations->hasAnnotation($class); |
| 50 | 53 | } |
| 51 | 54 | |
| 55 | + /** |
|
| 56 | + * @param string $annotation |
|
| 57 | + */ |
|
| 52 | 58 | public function getAnnotation($annotation) |
| 53 | 59 | { |
| 54 | 60 | return $this->annotations->getAnnotation($annotation); |
@@ -125,6 +131,9 @@ discard block |
||
| 125 | 131 | return ($method !== null) ? new ReflectionAnnotatedMethod($this->name, $method->name, $this->addendum) : null; |
| 126 | 132 | } |
| 127 | 133 | |
| 134 | + /** |
|
| 135 | + * @param \ReflectionProperty $property |
|
| 136 | + */ |
|
| 128 | 137 | private function createReflectionAnnotatedProperty($property) |
| 129 | 138 | { |
| 130 | 139 | return ($property !== null) ? new ReflectionAnnotatedProperty($this->name, $property->name, $this->addendum) : null; |
@@ -85,13 +85,6 @@ discard block |
||
| 85 | 85 | * (PHP 5)<br/> |
| 86 | 86 | * Exports a class |
| 87 | 87 | * @link http://php.net/manual/en/reflectionclass.export.php |
| 88 | - * @param mixed $argument <p> |
|
| 89 | - * The reflection to export. |
|
| 90 | - * </p> |
|
| 91 | - * @param bool $return [optional] <p> |
|
| 92 | - * Setting to <b>TRUE</b> will return the export, |
|
| 93 | - * as opposed to emitting it. Setting to <b>FALSE</b> (the default) will do the opposite. |
|
| 94 | - * </p> |
|
| 95 | 88 | * @return string If the <i>return</i> parameter |
| 96 | 89 | * is set to <b>TRUE</b>, then the export is returned as a string, |
| 97 | 90 | * otherwise <b>NULL</b> is returned. |
@@ -116,7 +109,7 @@ discard block |
||
| 116 | 109 | * (PHP 5)<br/> |
| 117 | 110 | * Checks if class is defined internally by an extension, or the core |
| 118 | 111 | * @link http://php.net/manual/en/reflectionclass.isinternal.php |
| 119 | - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 112 | + * @return boolean|null <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 120 | 113 | */ |
| 121 | 114 | public function isInternal() |
| 122 | 115 | { |
@@ -138,7 +131,7 @@ discard block |
||
| 138 | 131 | * (PHP 5)<br/> |
| 139 | 132 | * Checks if the class is instantiable |
| 140 | 133 | * @link http://php.net/manual/en/reflectionclass.isinstantiable.php |
| 141 | - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 134 | + * @return boolean|null <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 142 | 135 | */ |
| 143 | 136 | public function isInstantiable() |
| 144 | 137 | { |
@@ -149,7 +142,7 @@ discard block |
||
| 149 | 142 | * (PHP >= 5.4.0)<br/> |
| 150 | 143 | * Returns whether this class is cloneable |
| 151 | 144 | * @link http://php.net/manual/en/reflectionclass.iscloneable.php |
| 152 | - * @return bool <b>TRUE</b> if the class is cloneable, <b>FALSE</b> otherwise. |
|
| 145 | + * @return boolean|null <b>TRUE</b> if the class is cloneable, <b>FALSE</b> otherwise. |
|
| 153 | 146 | */ |
| 154 | 147 | public function isCloneable() |
| 155 | 148 | { |
@@ -317,7 +310,7 @@ discard block |
||
| 317 | 310 | * @param string $name <p> |
| 318 | 311 | * The name of the constant being checked for. |
| 319 | 312 | * </p> |
| 320 | - * @return bool <b>TRUE</b> if the constant is defined, otherwise <b>FALSE</b>. |
|
| 313 | + * @return boolean|null <b>TRUE</b> if the constant is defined, otherwise <b>FALSE</b>. |
|
| 321 | 314 | */ |
| 322 | 315 | public function hasConstant($name) |
| 323 | 316 | { |
@@ -377,7 +370,7 @@ discard block |
||
| 377 | 370 | * (PHP 5)<br/> |
| 378 | 371 | * Checks if the class is an interface |
| 379 | 372 | * @link http://php.net/manual/en/reflectionclass.isinterface.php |
| 380 | - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 373 | + * @return boolean|null <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 381 | 374 | */ |
| 382 | 375 | public function isInterface() |
| 383 | 376 | { |
@@ -426,7 +419,7 @@ discard block |
||
| 426 | 419 | * (PHP >= 5.4.0)<br/> |
| 427 | 420 | * Returns whether this is a trait |
| 428 | 421 | * @link http://php.net/manual/en/reflectionclass.istrait.php |
| 429 | - * @return bool <b>TRUE</b> if this is a trait, <b>FALSE</b> otherwise. |
|
| 422 | + * @return boolean|null <b>TRUE</b> if this is a trait, <b>FALSE</b> otherwise. |
|
| 430 | 423 | * Returns <b>NULL</b> in case of an error. |
| 431 | 424 | */ |
| 432 | 425 | public function isTrait() |
@@ -438,7 +431,7 @@ discard block |
||
| 438 | 431 | * (PHP 5)<br/> |
| 439 | 432 | * Checks if class is abstract |
| 440 | 433 | * @link http://php.net/manual/en/reflectionclass.isabstract.php |
| 441 | - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 434 | + * @return boolean|null <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 442 | 435 | */ |
| 443 | 436 | public function isAbstract() |
| 444 | 437 | { |
@@ -449,7 +442,7 @@ discard block |
||
| 449 | 442 | * (PHP 5)<br/> |
| 450 | 443 | * Checks if class is final |
| 451 | 444 | * @link http://php.net/manual/en/reflectionclass.isfinal.php |
| 452 | - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 445 | + * @return boolean|null <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 453 | 446 | */ |
| 454 | 447 | public function isFinal() |
| 455 | 448 | { |
@@ -475,7 +468,7 @@ discard block |
||
| 475 | 468 | * @param object $object <p> |
| 476 | 469 | * The object being compared to. |
| 477 | 470 | * </p> |
| 478 | - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 471 | + * @return boolean|null <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 479 | 472 | */ |
| 480 | 473 | public function isInstance($object) |
| 481 | 474 | { |
@@ -541,7 +534,7 @@ discard block |
||
| 541 | 534 | * @param string $class <p> |
| 542 | 535 | * The class name being checked against. |
| 543 | 536 | * </p> |
| 544 | - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 537 | + * @return boolean|null <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 545 | 538 | */ |
| 546 | 539 | public function isSubclassOf($class) |
| 547 | 540 | { |
@@ -611,7 +604,7 @@ discard block |
||
| 611 | 604 | * (PHP 5)<br/> |
| 612 | 605 | * Checks if iterateable |
| 613 | 606 | * @link http://php.net/manual/en/reflectionclass.isiterateable.php |
| 614 | - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 607 | + * @return boolean|null <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 615 | 608 | */ |
| 616 | 609 | public function isIterateable() |
| 617 | 610 | { |
@@ -625,7 +618,7 @@ discard block |
||
| 625 | 618 | * @param string $interface <p> |
| 626 | 619 | * The interface name. |
| 627 | 620 | * </p> |
| 628 | - * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 621 | + * @return boolean|null <b>TRUE</b> on success or <b>FALSE</b> on failure. |
|
| 629 | 622 | */ |
| 630 | 623 | public function implementsInterface($interface) |
| 631 | 624 | { |
@@ -648,7 +641,7 @@ discard block |
||
| 648 | 641 | * (PHP 5)<br/> |
| 649 | 642 | * Gets the name of the extension which defined the class |
| 650 | 643 | * @link http://php.net/manual/en/reflectionclass.getextensionname.php |
| 651 | - * @return string The name of the extension which defined the class, or <b>FALSE</b> for user-defined classes. |
|
| 644 | + * @return boolean The name of the extension which defined the class, or <b>FALSE</b> for user-defined classes. |
|
| 652 | 645 | */ |
| 653 | 646 | public function getExtensionName() |
| 654 | 647 | { |
@@ -43,6 +43,9 @@ discard block |
||
| 43 | 43 | self::$parsedFiles = []; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @param Reflector $reflection |
|
| 48 | + */ |
|
| 46 | 49 | public function get($reflection) |
| 47 | 50 | { |
| 48 | 51 | if ($reflection instanceof ReflectionClass) |
@@ -142,6 +145,9 @@ discard block |
||
| 142 | 145 | return isset(self::$fields[$class][$field]) ? self::$fields[$class][$field] : false; |
| 143 | 146 | } |
| 144 | 147 | |
| 148 | + /** |
|
| 149 | + * @param string $fqn |
|
| 150 | + */ |
|
| 145 | 151 | private function processAnonymous(Reflector $reflection, $fqn) |
| 146 | 152 | { |
| 147 | 153 | if (!isset(self::$parsedFiles[$fqn])) |
@@ -322,6 +328,9 @@ discard block |
||
| 322 | 328 | return $fqn; |
| 323 | 329 | } |
| 324 | 330 | |
| 331 | + /** |
|
| 332 | + * @param integer $max |
|
| 333 | + */ |
|
| 325 | 334 | private function getString($tokens, &$i, $max) |
| 326 | 335 | { |
| 327 | 336 | do |
@@ -103,6 +103,9 @@ discard block |
||
| 103 | 103 | $this->checker = new Checker($this->basePath); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | + /** |
|
| 107 | + * @param string $className |
|
| 108 | + */ |
|
| 106 | 109 | public function get($className) |
| 107 | 110 | { |
| 108 | 111 | assert(!empty($className)); |
@@ -118,6 +121,10 @@ discard block |
||
| 118 | 121 | return $data; |
| 119 | 122 | } |
| 120 | 123 | |
| 124 | + /** |
|
| 125 | + * @param string $className |
|
| 126 | + * @param \Maslosoft\Addendum\Collections\Meta $data |
|
| 127 | + */ |
|
| 121 | 128 | public function set($className, $data): bool |
| 122 | 129 | { |
| 123 | 130 | $this->cleaner->clean($className); |
@@ -137,6 +144,9 @@ discard block |
||
| 137 | 144 | $this->nsCache->setOptions($options); |
| 138 | 145 | } |
| 139 | 146 | |
| 147 | + /** |
|
| 148 | + * @return string |
|
| 149 | + */ |
|
| 140 | 150 | private function getInstanceId(MetaOptions $options = null) |
| 141 | 151 | { |
| 142 | 152 | if (empty($options)) |