@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | /** |
| 43 | 43 | * Register event handlers for parent of parent-child relation. |
| 44 | 44 | * |
| 45 | - * @param AnnotatedInterface|string $parent |
|
| 45 | + * @param string $parent |
|
| 46 | 46 | * @param string $childClass |
| 47 | 47 | */ |
| 48 | 48 | public function registerParent($parent, $childClass) |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | /** |
| 157 | 157 | * Register event handlers for child item of parent-child relation. |
| 158 | 158 | * |
| 159 | - * @param AnnotatedInterface|string $child |
|
| 159 | + * @param string $child |
|
| 160 | 160 | * @param string $parentClass |
| 161 | 161 | * @throws UnexpectedValueException |
| 162 | 162 | */ |
@@ -42,6 +42,9 @@ |
||
| 42 | 42 | private $_values = []; |
| 43 | 43 | private $_defaults = []; |
| 44 | 44 | |
| 45 | + /** |
|
| 46 | + * @param \Maslosoft\Addendum\Interfaces\AnnotatedInterface $model |
|
| 47 | + */ |
|
| 45 | 48 | public function __construct($model) |
| 46 | 49 | { |
| 47 | 50 | // This is to use get/set |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | use Maslosoft\Mangan\Helpers\PropertyMaker; |
| 17 | 17 | use Maslosoft\Mangan\Mangan; |
| 18 | -use Maslosoft\Mangan\Meta\DocumentTypeMeta; |
|
| 19 | 18 | use Maslosoft\Mangan\Meta\ManganMeta; |
| 20 | 19 | use Maslosoft\Mangan\Traits\Defaults\MongoClientOptions; |
| 21 | 20 | |
@@ -75,6 +75,7 @@ |
||
| 75 | 75 | * @param AnnotatedInterface[] $instances |
| 76 | 76 | * @param mixed[] $dbValue |
| 77 | 77 | * @param mixed[] $data |
| 78 | + * @param AnnotatedInterface $parent |
|
| 78 | 79 | * @return AnnotatedInterface|null |
| 79 | 80 | */ |
| 80 | 81 | private function _getInstance($instances, $dbValue, $data, $parent = null, $parentField = '') |
@@ -613,6 +613,9 @@ discard block |
||
| 613 | 613 | |
| 614 | 614 | // <editor-fold defaultstate="collapsed" desc="Event and Signal handling"> |
| 615 | 615 | |
| 616 | + /** |
|
| 617 | + * @param AnnotatedInterface $model |
|
| 618 | + */ |
|
| 616 | 619 | private function beforeValidate($model) |
| 617 | 620 | { |
| 618 | 621 | AspectManager::addAspect($model, self::AspectSaving); |
@@ -621,7 +624,7 @@ discard block |
||
| 621 | 624 | /** |
| 622 | 625 | * Take care of EventBeforeSave |
| 623 | 626 | * @see EventBeforeSave |
| 624 | - * @param $model |
|
| 627 | + * @param AnnotatedInterface $model |
|
| 625 | 628 | * @param string $event |
| 626 | 629 | * @return boolean |
| 627 | 630 | */ |
@@ -643,7 +646,7 @@ discard block |
||
| 643 | 646 | /** |
| 644 | 647 | * Take care of EventAfterSave |
| 645 | 648 | * @see EventAfterSave |
| 646 | - * @param $model |
|
| 649 | + * @param AnnotatedInterface $model |
|
| 647 | 650 | * @param null|ModelEvent $event |
| 648 | 651 | */ |
| 649 | 652 | private function afterSave($model, $event = null) |