@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * @param Client $client |
| 57 | - * @param \MongoDB|string $database |
|
| 57 | + * @param string $database |
|
| 58 | 58 | */ |
| 59 | 59 | public function __construct(Client $client, $database) |
| 60 | 60 | { |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | /** |
| 155 | 155 | * Reset specified mapping |
| 156 | 156 | * |
| 157 | - * @return \Sokil\Mongo\Client |
|
| 157 | + * @return Database |
|
| 158 | 158 | */ |
| 159 | 159 | public function resetMapping() |
| 160 | 160 | { |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | * [collectionName => collectionClass, ...] |
| 171 | 171 | * @param string|array|Definition|null $classDefinition if $name is string, then full class name or array |
| 172 | 172 | * with parameters, else omitted |
| 173 | - * @return \Sokil\Mongo\Client |
|
| 173 | + * @return Database |
|
| 174 | 174 | */ |
| 175 | 175 | public function map($name, $classDefinition = null) |
| 176 | 176 | { |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | * @param string $name name of collection |
| 233 | 233 | * @param array $defaultDefinition definition used when no definition found for defined class |
| 234 | 234 | * @throws Exception |
| 235 | - * @return string|array name of class or array of class definition |
|
| 235 | + * @return string name of class or array of class definition |
|
| 236 | 236 | */ |
| 237 | 237 | private function getCollectionDefinition($name, array $defaultDefinition = null) |
| 238 | 238 | { |
@@ -30,6 +30,9 @@ discard block |
||
| 30 | 30 | return $this; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | + /** |
|
| 34 | + * @param string $fieldName |
|
| 35 | + */ |
|
| 33 | 36 | public function push($fieldName, $value) |
| 34 | 37 | { |
| 35 | 38 | // prepare to store |
@@ -59,6 +62,9 @@ discard block |
||
| 59 | 62 | return $this; |
| 60 | 63 | } |
| 61 | 64 | |
| 65 | + /** |
|
| 66 | + * @param string $fieldName |
|
| 67 | + */ |
|
| 62 | 68 | public function pushEach($fieldName, array $values) |
| 63 | 69 | { |
| 64 | 70 | // value must be list, not dictionary |
@@ -337,6 +343,9 @@ discard block |
||
| 337 | 343 | return $this; |
| 338 | 344 | } |
| 339 | 345 | |
| 346 | + /** |
|
| 347 | + * @param string $operation |
|
| 348 | + */ |
|
| 340 | 349 | public function get($operation, $fieldName = null) |
| 341 | 350 | { |
| 342 | 351 | if ($fieldName) { |
@@ -372,7 +381,7 @@ discard block |
||
| 372 | 381 | /** |
| 373 | 382 | * Transform operator in different formats to canonical array form |
| 374 | 383 | * |
| 375 | - * @param mixed $mixed |
|
| 384 | + * @param callable $mixed |
|
| 376 | 385 | * @return array |
| 377 | 386 | * @throws \Sokil\Mongo\Exception |
| 378 | 387 | */ |