Skip to content

Commit 8c6a88f

Browse files
committed
Result object fixes
- i should do this in branch ✨
1 parent 0743c99 commit 8c6a88f

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ before_script:
99

1010
script:
1111
- vendor/bin/tester -c tests/php.ini tests
12-
- vendor/bin/phpstan analyse -l 7 src tests
12+
- vendor/bin/phpstan analyse -l 7 -c phpstan.neon src tests

phpstan.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
parameters:
2+
ignoreErrors:
3+
- "Call to function array_key_exists\(\) with string and array\<int, mixed\> will always evaluate to false."

src/Aggregation/AggregationCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function filter() : \Spameri\ElasticQuery\Filter\FilterCollection
4444

4545

4646
public function add(
47-
LeafAggregationInterface $leafAggregation
47+
LeafAggregationCollection $leafAggregation
4848
) : void
4949
{
5050
$this->aggregations[$leafAggregation->key()] = $leafAggregation;

src/Aggregation/Term.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Term implements LeafAggregationInterface
2525
private $missing;
2626

2727
/**
28-
* @var string
28+
* @var ?string
2929
*/
3030
private $key;
3131

src/Options.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ class Options
77
{
88

99
/**
10-
* @var int
10+
* @var ?int
1111
*/
1212
private $size;
1313
/**
14-
* @var int
14+
* @var ?int
1515
*/
1616
private $from;
1717
/**
1818
* @var \Spameri\ElasticQuery\Options\SortCollection
1919
*/
2020
private $sort;
2121
/**
22-
* @var int
22+
* @var ?float
2323
*/
2424
private $minScore;
2525

@@ -28,7 +28,7 @@ public function __construct(
2828
?int $size = NULL,
2929
?int $from = NULL,
3030
?\Spameri\ElasticQuery\Options\SortCollection $sort = NULL,
31-
float $minScore = NULL
31+
?float $minScore = NULL
3232
)
3333
{
3434
$this->size = $size;

tests/SpameriTests/ElasticQuery/Response/Result.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require_once __DIR__ . '/../../bootstrap.php';
99
class Result extends \Tester\TestCase
1010
{
1111

12-
public function createTest(): void
12+
public function testCreate() : void
1313
{
1414
$result = [
1515
'took' => 37,

0 commit comments

Comments
 (0)