@@ -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); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | /** |
37 | 37 | * Move to trash |
38 | - * @return boolean |
|
38 | + * @return false|null |
|
39 | 39 | * @Ignored |
40 | 40 | */ |
41 | 41 | public function trash() |
@@ -33,7 +33,7 @@ discard block |
||
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 | */ |
@@ -98,6 +98,11 @@ discard block |
||
98 | 98 | return FinalizingManager::toModel(static::class, $model); |
99 | 99 | } |
100 | 100 | |
101 | + /** |
|
102 | + * @param null|AnnotatedInterface $instance |
|
103 | + * |
|
104 | + * @return AnnotatedInterface |
|
105 | + */ |
|
101 | 106 | private static function _toDocument($className, $data, $instance) |
102 | 107 | { |
103 | 108 | if ($instance) |
@@ -13,8 +13,6 @@ |
||
13 | 13 | |
14 | 14 | namespace Maslosoft\Mangan\Criteria; |
15 | 15 | |
16 | -use Maslosoft\Addendum\Interfaces\AnnotatedInterface; |
|
17 | - |
|
18 | 16 | /** |
19 | 17 | * Conditions |
20 | 18 | * |
@@ -122,8 +122,7 @@ |
||
122 | 122 | /** |
123 | 123 | * Checks whether there is row satisfying the specified condition. |
124 | 124 | * See {@link find()} for detailed explanation about $condition and $params. |
125 | - * @param mixed $criteria query condition or criteria. |
|
126 | - * @param array $params parameters to be bound to an SQL statement. |
|
125 | + * @param null|Criteria $criteria query condition or criteria. |
|
127 | 126 | * @return boolean whether there is row satisfying the specified condition. |
128 | 127 | */ |
129 | 128 | public function exists(Criteria $criteria = null); |
@@ -280,7 +280,7 @@ |
||
280 | 280 | * Returns the real definition of an attribute given its name. |
281 | 281 | * |
282 | 282 | * @param string $attribute the attribute name that the user requests to sort on |
283 | - * @return mixed the attribute name or the virtual attribute definition. False if the attribute cannot be sorted. |
|
283 | + * @return string the attribute name or the virtual attribute definition. False if the attribute cannot be sorted. |
|
284 | 284 | * @deprecated since version number |
285 | 285 | */ |
286 | 286 | public function resolveAttribute($attribute) |
@@ -151,8 +151,7 @@ |
||
151 | 151 | /** |
152 | 152 | * Checks whether there is row satisfying the specified condition. |
153 | 153 | * See {@link find()} for detailed explanation about $condition and $params. |
154 | - * @param mixed $criteria query condition or criteria. |
|
155 | - * @param array $params parameters to be bound to an SQL statement. |
|
154 | + * @param null|Criteria $criteria query condition or criteria. |
|
156 | 155 | * @return boolean whether there is row satisfying the specified condition. |
157 | 156 | * @Ignore |
158 | 157 | */ |
@@ -128,6 +128,9 @@ |
||
128 | 128 | return false; |
129 | 129 | } |
130 | 130 | |
131 | + /** |
|
132 | + * @param AnnotatedInterface $message |
|
133 | + */ |
|
131 | 134 | public function addError($message) |
132 | 135 | { |
133 | 136 |