| @@ -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); | 
| @@ -23,9 +23,9 @@ | ||
| 23 | 23 | |
| 24 | 24 | /** | 
| 25 | 25 | * Returns the given object as an associative array | 
| 26 | - * @param AnnotatedInterface|object $model | |
| 26 | + * @param AnnotatedInterface $model | |
| 27 | 27 | * @param string[] $fields Fields to transform | 
| 28 | - * @return array an associative array of the contents of this object | |
| 28 | + * @return string an associative array of the contents of this object | |
| 29 | 29 | */ | 
| 30 | 30 | public static function fromModel(AnnotatedInterface $model, $fields = []) | 
| 31 | 31 |  	{ | 
| @@ -23,9 +23,9 @@ | ||
| 23 | 23 | |
| 24 | 24 | /** | 
| 25 | 25 | * Returns the given object as an associative array | 
| 26 | - * @param AnnotatedInterface|object $model | |
| 26 | + * @param AnnotatedInterface $model | |
| 27 | 27 | * @param string[] $fields Fields to transform | 
| 28 | - * @return array an associative array of the contents of this object | |
| 28 | + * @return string an associative array of the contents of this object | |
| 29 | 29 | */ | 
| 30 | 30 | public static function fromModel(AnnotatedInterface $model, $fields = []) | 
| 31 | 31 |  	{ | 
| @@ -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 | */ | 
| @@ -34,7 +34,7 @@ discard block | ||
| 34 | 34 | * Each call will be groupped 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) | 
| @@ -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 |  	{ | 
| @@ -363,7 +363,7 @@ discard block | ||
| 363 | 363 | /** | 
| 364 | 364 | * Get properties which should be propagated. | 
| 365 | 365 | * NOTE: This is cached, as it might be called numerous times | 
| 366 | - * @param object $model | |
| 366 | + * @param AnnotatedInterface $model | |
| 367 | 367 | * @return bool[] | 
| 368 | 368 | */ | 
| 369 | 369 | private static function getPropagatedProperties($model) | 
| @@ -385,6 +385,9 @@ discard block | ||
| 385 | 385 | return self::$propagated[$key]; | 
| 386 | 386 | } | 
| 387 | 387 | |
| 388 | + /** | |
| 389 | + * @param string $className | |
| 390 | + */ | |
| 388 | 391 | public static function getPartials($className) | 
| 389 | 392 |  	{ | 
| 390 | 393 | if (!empty(self::$partials[$className])) | 
| @@ -1,7 +1,5 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | -use Maslosoft\Ilmatar\Components\Controller; | |
| 4 | -use Maslosoft\Ilmatar\Widgets\Form\ActiveForm; | |
| 5 | 3 | use Maslosoft\Mangan\Traits\I18NAbleTrait; | 
| 6 | 4 | use Maslosoft\Zamm\DocBlock; | 
| 7 | 5 | use Maslosoft\Zamm\Iterator; |