@@ -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 | { |
@@ -100,7 +100,7 @@ |
||
100 | 100 | * } |
101 | 101 | * ``` |
102 | 102 | * |
103 | - * @return AnnotatedEntityInteface |
|
103 | + * @return AnnotationEntityInterface |
|
104 | 104 | */ |
105 | 105 | public function getEntity() |
106 | 106 | { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | /** |
34 | 34 | * Check target constraints |
35 | 35 | * @param AnnotationInterface $annotation Annotation |
36 | - * @param ReflectionClass|ReflectionMethod|ReflectionProperty|bool $target |
|
36 | + * @param boolean $target |
|
37 | 37 | * @return type |
38 | 38 | * @throws TargetException |
39 | 39 | */ |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | |
251 | 251 | /** |
252 | 252 | * Clear entire cache |
253 | - * @return boolean |
|
253 | + * @return false|null |
|
254 | 254 | */ |
255 | 255 | public function clear() |
256 | 256 | { |
@@ -264,6 +264,9 @@ discard block |
||
264 | 264 | return $this->clearPath($path); |
265 | 265 | } |
266 | 266 | |
267 | + /** |
|
268 | + * @param string $path |
|
269 | + */ |
|
267 | 270 | private function clearPath($path) |
268 | 271 | { |
269 | 272 | if (!file_exists($path)) |
@@ -15,7 +15,6 @@ |
||
15 | 15 | namespace Maslosoft\Addendum; |
16 | 16 | |
17 | 17 | use Maslosoft\Addendum\Exceptions\CircularReferenceException; |
18 | -use Maslosoft\Addendum\Interfaces\AnnotatedInterface; |
|
19 | 18 | use Maslosoft\Addendum\Interfaces\AnnotationInterface; |
20 | 19 | use Maslosoft\Addendum\Utilities\ConflictChecker; |
21 | 20 | use Maslosoft\Addendum\Utilities\TargetChecker; |
@@ -241,7 +241,7 @@ |
||
241 | 241 | * Calling this function will create new instance only if it's not stored in cache. |
242 | 242 | * This allows very effective retrieving of `Meta` container's meta data, without need of parsing annotations. |
243 | 243 | * @param string|object|AnnotatedInterface $model |
244 | - * @param MetaOption|null $options |
|
244 | + * @param null|MetaOptions $options |
|
245 | 245 | * @return static |
246 | 246 | */ |
247 | 247 | public static function create($model, MetaOptions $options = null) |
@@ -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 |
@@ -20,6 +20,9 @@ |
||
20 | 20 | parent::__construct($message, $code, $previous); |
21 | 21 | } |
22 | 22 | |
23 | + /** |
|
24 | + * @param integer $errcode |
|
25 | + */ |
|
23 | 26 | private function errorToText($errcode) |
24 | 27 | { |
25 | 28 | static $messages; |