| @@ -47,6 +47,9 @@ | ||
| 47 | 47 | */ | 
| 48 | 48 | private $isIndexable = false; | 
| 49 | 49 | |
| 50 | + /** | |
| 51 | + * @param AnnotatedInterface $model | |
| 52 | + */ | |
| 50 | 53 | public function __construct($model) | 
| 51 | 54 |  	{ | 
| 52 | 55 | $this->model = $model; | 
| @@ -37,7 +37,7 @@ | ||
| 37 | 37 | /** | 
| 38 | 38 | * Set currently used index | 
| 39 | 39 | * @param string $index | 
| 40 | - * @return static | |
| 40 | + * @return IndexAwareInterface | |
| 41 | 41 | */ | 
| 42 | 42 | public function setIndex($index) | 
| 43 | 43 |  	{ | 
| @@ -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 |  	{ | 
| @@ -54,7 +54,7 @@ discard block | ||
| 54 | 54 | * @param AnnotatedInterface $model Model which is about to be decorated | 
| 55 | 55 | * @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. | 
| 56 | 56 | * @param string $transformatorClass Transformator class used | 
| 57 | - * @return bool Return true to store value to database | |
| 57 | + * @return boolean|null Return true to store value to database | |
| 58 | 58 | */ | 
| 59 | 59 | public function write($model, &$dbValues, $transformatorClass = TransformatorInterface::class) | 
| 60 | 60 |  	{ | 
| @@ -3,8 +3,6 @@ | ||
| 3 | 3 | namespace Maslosoft\Manganel\Helpers; | 
| 4 | 4 | |
| 5 | 5 | use MongoId; | 
| 6 | -use RecursiveArrayIterator; | |
| 7 | -use RecursiveIteratorIterator; | |
| 8 | 6 | |
| 9 | 7 | /** | 
| 10 | 8 | * RecursiveFilter | 
| @@ -13,6 +13,9 @@ | ||
| 13 | 13 | class TypeNamer extends CollectionNamer | 
| 14 | 14 |  { | 
| 15 | 15 | |
| 16 | + /** | |
| 17 | + * @param \Maslosoft\Addendum\Interfaces\AnnotatedInterface $model | |
| 18 | + */ | |
| 16 | 19 | public static function nameType($model) | 
| 17 | 20 |  	{ | 
| 18 | 21 | $enforcedType = ManganelMeta::create($model)->type()->type; | 
| @@ -6,7 +6,6 @@ | ||
| 6 | 6 | use Maslosoft\Manganel\Interfaces\QueryBuilder\QueryStringDecoratorInterface; | 
| 7 | 7 | use Maslosoft\Manganel\Meta\ManganelMeta; | 
| 8 | 8 | use Maslosoft\Manganel\SearchCriteria; | 
| 9 | -use UnexpectedValueException; | |
| 10 | 9 | |
| 11 | 10 | /** | 
| 12 | 11 | * BoostDecorator | 
| @@ -41,6 +41,9 @@ discard block | ||
| 41 | 41 | */ | 
| 42 | 42 | private $manganel = null; | 
| 43 | 43 | |
| 44 | + /** | |
| 45 | + * @param AnnotatedInterface $model | |
| 46 | + */ | |
| 44 | 47 | public function __construct($model = null) | 
| 45 | 48 |  	{ | 
| 46 | 49 | if (!empty($model)) | 
| @@ -172,6 +175,9 @@ discard block | ||
| 172 | 175 | return $result['hits']['hits']; | 
| 173 | 176 | } | 
| 174 | 177 | |
| 178 | + /** | |
| 179 | + * @param string $q | |
| 180 | + */ | |
| 175 | 181 | public function getParams($q = null) | 
| 176 | 182 |  	{ | 
| 177 | 183 | $body = []; |