@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | { |
| 21 | 21 | $count = 0; |
| 22 | 22 | |
| 23 | - $callback = function ($connections) use (&$count): Connection { |
|
| 23 | + $callback = function($connections) use (&$count): Connection { |
|
| 24 | 24 | ++$count; |
| 25 | 25 | |
| 26 | 26 | return \current($connections); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | { |
| 41 | 41 | $count = 0; |
| 42 | 42 | |
| 43 | - $config = ['connectionStrategy' => function ($connections) use (&$count): Connection { |
|
| 43 | + $config = ['connectionStrategy' => function($connections) use (&$count): Connection { |
|
| 44 | 44 | ++$count; |
| 45 | 45 | |
| 46 | 46 | return \current($connections); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function testCreateCallbackStrategy() |
| 21 | 21 | { |
| 22 | - $callback = function ($connections) { |
|
| 22 | + $callback = function($connections) { |
|
| 23 | 23 | }; |
| 24 | 24 | |
| 25 | 25 | $strategy = StrategyFactory::create($callback); |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | $agg->setField('color'); |
| 73 | 73 | $agg->setOrders([ |
| 74 | 74 | ['_count' => 'asc'], // 1. red, 2. green, 3. blue |
| 75 | - ['_key' => 'asc'], // 1. green, 2. red, 3. blue |
|
| 75 | + ['_key' => 'asc'], // 1. green, 2. red, 3. blue |
|
| 76 | 76 | ]); |
| 77 | 77 | |
| 78 | 78 | $query = new Query(); |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | 'tags' => ['foo', 'bar'], |
| 45 | 45 | ]), |
| 46 | 46 | new Document(2, [ |
| 47 | - 'comments' => [ |
|
| 47 | + 'comments' => [ |
|
| 48 | 48 | [ |
| 49 | 49 | 'name' => 'bob', |
| 50 | 50 | 'body' => 'this is another comment from bob', |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | { |
| 125 | 125 | $topNames = new Terms('top-names'); |
| 126 | 126 | $topNames->setField('owner') |
| 127 | - ->setSize(10); |
|
| 127 | + ->setSize(10); |
|
| 128 | 128 | |
| 129 | 129 | $toQuestions = new ParentAggregation('to-questions'); |
| 130 | 130 | $toQuestions->setType('answer'); |
@@ -122,15 +122,15 @@ |
||
| 122 | 122 | |
| 123 | 123 | $expected = [ |
| 124 | 124 | 'properties' => [ |
| 125 | - 'firstname' => ['type' => 'text', 'store' => true], |
|
| 126 | - 'lastname' => ['type' => 'text'], |
|
| 127 | - 'my_join_field' => [ |
|
| 128 | - 'type' => 'join', |
|
| 129 | - 'relations' => [ |
|
| 130 | - 'question' => 'answer', |
|
| 131 | - ], |
|
| 132 | - ], |
|
| 133 | - ], |
|
| 125 | + 'firstname' => ['type' => 'text', 'store' => true], |
|
| 126 | + 'lastname' => ['type' => 'text'], |
|
| 127 | + 'my_join_field' => [ |
|
| 128 | + 'type' => 'join', |
|
| 129 | + 'relations' => [ |
|
| 130 | + 'question' => 'answer', |
|
| 131 | + ], |
|
| 132 | + ], |
|
| 133 | + ], |
|
| 134 | 134 | ]; |
| 135 | 135 | |
| 136 | 136 | $this->assertEquals($expected, $mapping->toArray()); |
@@ -191,7 +191,7 @@ |
||
| 191 | 191 | 'properties' => [ |
| 192 | 192 | 'titulo' => ['type' => 'text', 'copy_to' => 'testall', 'boost' => 1.0], |
| 193 | 193 | 'contenido' => ['type' => 'text', 'copy_to' => 'testall', 'boost' => 1.0], |
| 194 | - 'testall' => ['type' => 'text', 'boost' => 1.0], |
|
| 194 | + 'testall' => ['type' => 'text', 'boost' => 1.0], |
|
| 195 | 195 | ], |
| 196 | 196 | ], |
| 197 | 197 | ]); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $signer = new SignatureV4('es', $region); |
| 44 | 44 | $credProvider = $this->getCredentialProvider(); |
| 45 | 45 | |
| 46 | - return Middleware::mapRequest(function (RequestInterface $req) use ( |
|
| 46 | + return Middleware::mapRequest(function(RequestInterface $req) use ( |
|
| 47 | 47 | $signer, |
| 48 | 48 | $credProvider |
| 49 | 49 | ) { |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | * |
| 255 | 255 | * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html |
| 256 | 256 | * |
| 257 | - * @param array|\Elastica\Document[] $docs Array of Elastica\Document |
|
| 257 | + * @param Document[] $docs Array of Elastica\Document |
|
| 258 | 258 | * |
| 259 | 259 | * @throws InvalidException If docs is empty |
| 260 | 260 | */ |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | /** |
| 377 | 377 | * Bulk deletes documents. |
| 378 | 378 | * |
| 379 | - * @param array|\Elastica\Document[] $docs |
|
| 379 | + * @param Document[] $docs |
|
| 380 | 380 | * |
| 381 | 381 | * @throws InvalidException |
| 382 | 382 | */ |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | } |
| 474 | 474 | |
| 475 | 475 | /** |
| 476 | - * @param array|\Elastica\Connection[] $connections |
|
| 476 | + * @param Connection[] $connections |
|
| 477 | 477 | * |
| 478 | 478 | * @return $this |
| 479 | 479 | */ |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | $this->assertEquals('AnonCoin', $index->getDocument(1)->get('name')); |
| 164 | 164 | $this->assertEquals('iXcoin', $index->getDocument(2)->get('name')); |
| 165 | 165 | |
| 166 | - $ixCoin->setIndex(null); // Make sure the index gets set properly if missing |
|
| 166 | + $ixCoin->setIndex(null); // Make sure the index gets set properly if missing |
|
| 167 | 167 | $index->deleteDocuments([$anonCoin, $ixCoin]); |
| 168 | 168 | |
| 169 | 169 | $this->expectException(NotFoundException::class); |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | $count = 0; |
| 377 | 377 | |
| 378 | 378 | // Callback function which verifies that disabled connection objects are returned |
| 379 | - $callback = function (Connection $connection, \Exception $exception, Client $client) use (&$count) { |
|
| 379 | + $callback = function(Connection $connection, \Exception $exception, Client $client) use (&$count) { |
|
| 380 | 380 | $this->assertInstanceOf(Connection::class, $connection); |
| 381 | 381 | $this->assertInstanceOf(ConnectionException::class, $exception); |
| 382 | 382 | $this->assertInstanceOf(Client::class, $client); |