@@ -72,7 +72,7 @@ |
||
72 | 72 | /** |
73 | 73 | * Delete index. |
74 | 74 | * |
75 | - * @param mixed $index |
|
75 | + * @param string $index |
|
76 | 76 | */ |
77 | 77 | protected function deleteIndex($index) |
78 | 78 | { |
@@ -18,7 +18,7 @@ |
||
18 | 18 | /** |
19 | 19 | * Put response. |
20 | 20 | * |
21 | - * @param array $response |
|
21 | + * @param callable $response |
|
22 | 22 | */ |
23 | 23 | public function response(array $response) |
24 | 24 | { |
@@ -4,9 +4,9 @@ |
||
4 | 4 | |
5 | 5 | use Elasticsearch\Client; |
6 | 6 | use Elasticsearch\Common\Exceptions\Missing404Exception; |
7 | +use Isswp101\Persimmon\CollectionParser\ElasticsearchCollectionParser; |
|
7 | 8 | use Isswp101\Persimmon\Collection\ElasticsearchCollection; |
8 | 9 | use Isswp101\Persimmon\Collection\IElasticsearchCollection; |
9 | -use Isswp101\Persimmon\CollectionParser\ElasticsearchCollectionParser; |
|
10 | 10 | use Isswp101\Persimmon\Contracts\Storable; |
11 | 11 | use Isswp101\Persimmon\Exceptions\ClassTypeErrorException; |
12 | 12 | use Isswp101\Persimmon\Exceptions\ModelNotFoundException; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | /** |
46 | 46 | * Find model by id. |
47 | 47 | * |
48 | - * @param mixed $id |
|
48 | + * @param integer $id |
|
49 | 49 | * @return ElasticsearchModel|null |
50 | 50 | */ |
51 | 51 | public function find($id) |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | /** |
62 | 62 | * Save children. |
63 | 63 | * |
64 | - * @param ElasticsearchModel|ElasticsearchModel[] $child |
|
64 | + * @param \Isswp101\Persimmon\Test\Models\PurchaseOrderLine $child |
|
65 | 65 | */ |
66 | 66 | public function save($child) |
67 | 67 | { |
@@ -13,6 +13,9 @@ |
||
13 | 13 | $this->hits = Arr::get($response, 'inner_hits', []); |
14 | 14 | } |
15 | 15 | |
16 | + /** |
|
17 | + * @param string $parentType |
|
18 | + */ |
|
16 | 19 | public function getParentId($parentType) |
17 | 20 | { |
18 | 21 | return Arr::get($this->hits, $parentType . '.hits.hits.0._id'); |