| @@ -424,7 +424,7 @@ | ||
| 424 | 424 | |
| 425 | 425 | /** | 
| 426 | 426 | * Set conditions | 
| 427 | - * @param array|Conditions $conditions | |
| 427 | + * @param Conditions $conditions | |
| 428 | 428 | * @return Criteria | 
| 429 | 429 | */ | 
| 430 | 430 | public function setConditions($conditions) | 
| @@ -34,7 +34,7 @@ discard block | ||
| 34 | 34 | * @param AnnotatedInterface $model Document model which will be decorated | 
| 35 | 35 | * @param mixed $dbValues | 
| 36 | 36 | * @param string $transformatorClass Transformator class used | 
| 37 | - * @return bool Return true if value should be assigned to model | |
| 37 | + * @return boolean|null Return true if value should be assigned to model | |
| 38 | 38 | */ | 
| 39 | 39 | public function read($model, &$dbValues, $transformatorClass = TransformatorInterface::class) | 
| 40 | 40 |  	{ | 
| @@ -55,7 +55,7 @@ discard block | ||
| 55 | 55 | * @param AnnotatedInterface $model Model which is about to be decorated | 
| 56 | 56 | * @param mixed[] $dbValues Whole model values from database. This is associative array with keys same as model properties (use $name param to access value). This is passed by reference. | 
| 57 | 57 | * @param string $transformatorClass Transformator class used | 
| 58 | - * @return bool Return true to store value to database | |
| 58 | + * @return boolean|null Return true to store value to database | |
| 59 | 59 | */ | 
| 60 | 60 | public function write($model, &$dbValues, $transformatorClass = TransformatorInterface::class) | 
| 61 | 61 |  	{ | 
| @@ -70,6 +70,10 @@ discard block | ||
| 70 | 70 | } | 
| 71 | 71 | } | 
| 72 | 72 | |
| 73 | + /** | |
| 74 | + * @param ManganMeta $meta | |
| 75 | + * @param AnnotatedInterface $model | |
| 76 | + */ | |
| 73 | 77 | private function _readValue($meta, $from, $to, &$dbValues, $model) | 
| 74 | 78 |  	{ | 
| 75 | 79 | $fieldMeta = $meta->$from; | 
| @@ -84,6 +88,10 @@ discard block | ||
| 84 | 88 | } | 
| 85 | 89 | } | 
| 86 | 90 | |
| 91 | + /** | |
| 92 | + * @param ManganMeta $meta | |
| 93 | + * @param AnnotatedInterface $model | |
| 94 | + */ | |
| 87 | 95 | private function _writeValue($meta, $from, $to, &$dbValues, $model) | 
| 88 | 96 |  	{ | 
| 89 | 97 | $fieldMeta = $meta->$from; | 
| @@ -26,6 +26,9 @@ | ||
| 26 | 26 | class Filter extends Transformator implements TransformatorFilterInterface | 
| 27 | 27 |  { | 
| 28 | 28 | |
| 29 | + /** | |
| 30 | + * @param \Maslosoft\Addendum\Interfaces\AnnotatedInterface $model | |
| 31 | + */ | |
| 29 | 32 | public function fromModel($model, DocumentPropertyMeta $fieldMeta) | 
| 30 | 33 |  	{ | 
| 31 | 34 | return $this->getFor($fieldMeta->name)->fromModel($model, $fieldMeta); | 
| @@ -27,10 +27,10 @@ | ||
| 27 | 27 | |
| 28 | 28 | /** | 
| 29 | 29 | * Returns the given object as an associative array | 
| 30 | - * @param AnnotatedInterface|object $model | |
| 30 | + * @param AnnotatedInterface $model | |
| 31 | 31 | * @param string[] $fields Fields to transform | 
| 32 | 32 | * @param int $options json_encode options | 
| 33 | - * @return array an associative array of the contents of this object | |
| 33 | + * @return string an associative array of the contents of this object | |
| 34 | 34 | */ | 
| 35 | 35 | public static function fromModel(AnnotatedInterface $model, $fields = [], $options = null) | 
| 36 | 36 |  	{ | 
| @@ -33,7 +33,7 @@ | ||
| 33 | 33 | |
| 34 | 34 | /** | 
| 35 | 35 | * Returns the given object as an associative array | 
| 36 | - * @param AnnotatedInterface|object $model | |
| 36 | + * @param AnnotatedInterface $model | |
| 37 | 37 | * @param string[] $fields Fields to transform | 
| 38 | 38 | * @return array an associative array of the contents of this object | 
| 39 | 39 | */ | 
| @@ -57,6 +57,7 @@ | ||
| 57 | 57 | * Class constructor | 
| 58 | 58 | * @param AnnotatedInterface $model | 
| 59 | 59 | * @param string $transformatorClass | 
| 60 | + * @param ManganMeta $meta | |
| 60 | 61 | */ | 
| 61 | 62 | public function __construct(AnnotatedInterface $model, $transformatorClass = TransformatorInterface::class, $meta = null) | 
| 62 | 63 |  	{ | 
| @@ -149,7 +149,7 @@ discard block | ||
| 149 | 149 | * initialization in class constructors etc. ensure that it is evaluated once, | 
| 150 | 150 | * or it might trigger same event handler multiple times. | 
| 151 | 151 | * | 
| 152 | - * @param AnnotatedInterface|object|string $model the object specifying the class-level event. | |
| 152 | + * @param AnnotatedInterface $model the object specifying the class-level event. | |
| 153 | 153 | * @param string $name the event name. | 
| 154 | 154 | * @param callable $handler the event handler. | 
| 155 | 155 | * @param mixed $data the data to be passed to the event handler when the event is triggered. | 
| @@ -405,7 +405,7 @@ discard block | ||
| 405 | 405 | /** | 
| 406 | 406 | * Get properties which should be propagated. | 
| 407 | 407 | * NOTE: This is cached, as it might be called numerous times | 
| 408 | - * @param object $model | |
| 408 | + * @param AnnotatedInterface $model | |
| 409 | 409 | * @return bool[] | 
| 410 | 410 | */ | 
| 411 | 411 | private static function getPropagatedProperties($model) | 
| @@ -431,7 +431,7 @@ discard block | ||
| 431 | 431 | * Get class/interface/trait names from which class is composed. | 
| 432 | 432 | * | 
| 433 | 433 | * @param string $className | 
| 434 | - * @return array | |
| 434 | + * @return null|callable | |
| 435 | 435 | */ | 
| 436 | 436 | public static function getPartials($className) | 
| 437 | 437 |  	{ | 
| @@ -69,6 +69,7 @@ | ||
| 69 | 69 | * @param AnnotatedInterface[] $instances | 
| 70 | 70 | * @param mixed[] $dbValue | 
| 71 | 71 | * @param mixed[] $data | 
| 72 | + * @param string $transformatorClass | |
| 72 | 73 | * @return AnnotatedInterface|null | 
| 73 | 74 | */ | 
| 74 | 75 | private function _getInstance($instances, $dbValue, $data, $transformatorClass) | 
| @@ -34,7 +34,7 @@ discard block | ||
| 34 | 34 | * Each call will be grouped with previous calls | 
| 35 | 35 | * @param string $fieldName | 
| 36 | 36 | * @param integer $order | 
| 37 | - * @return CriteriaInterface | |
| 37 | + * @return SortableTrait | |
| 38 | 38 | * @since v1.0 | 
| 39 | 39 | */ | 
| 40 | 40 | public function sort($fieldName, $order = SortInterface::SortAsc) | 
| @@ -118,7 +118,7 @@ discard block | ||
| 118 | 118 | * | 
| 119 | 119 | * | 
| 120 | 120 | * @param mixed[]|SortInterface | 
| 121 | - * @return CriteriaInterface | |
| 121 | + * @return SortableTrait | |
| 122 | 122 | */ | 
| 123 | 123 | public function setSort($sort) | 
| 124 | 124 |  	{ |