@@ -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; |
@@ -359,7 +359,7 @@ |
||
| 359 | 359 | |
| 360 | 360 | /** |
| 361 | 361 | * Trigger before find event |
| 362 | - * @return boolean |
|
| 362 | + * @return boolean|null |
|
| 363 | 363 | */ |
| 364 | 364 | private function _beforeFind() |
| 365 | 365 | { |
@@ -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); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | /** |
| 152 | 152 | * Returns the criteria. |
| 153 | - * @return array the query criteria |
|
| 153 | + * @return CriteriaInterface the query criteria |
|
| 154 | 154 | * @since v1.0 |
| 155 | 155 | */ |
| 156 | 156 | public function getCriteria() |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | /** |
| 205 | 205 | * Returns the pagination object. |
| 206 | 206 | * @param string $className the pagination object class name. Parameter is available since version 1.1.13. |
| 207 | - * @return CPagination|false the pagination object. If this is false, it means the pagination is disabled. |
|
| 207 | + * @return boolean the pagination object. If this is false, it means the pagination is disabled. |
|
| 208 | 208 | */ |
| 209 | 209 | public function getPagination($className = 'CPagination') |
| 210 | 210 | { |
@@ -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 | { |