Skip to content

Commit 91ae604

Browse files
committed
csf
1 parent 9bbe0dc commit 91ae604

3 files changed

Lines changed: 12 additions & 21 deletions

File tree

makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ tests-local:
2222
vendor/bin/tester -j 1 -c ./tests/SpameriTests/php.ini tests
2323

2424
phpstan:
25-
vendor/bin/phpstan analyse -l 6 -c phpstan.neon src tests
25+
vendor/bin/phpstan analyse -l 6 -c phpstan.neon src tests/SpameriTests
2626

2727
phpstan-lowest:
28-
vendor/bin/phpstan analyse -l 6 -c phpstan-low.neon src tests
28+
vendor/bin/phpstan analyse -l 6 -c phpstan-low.neon src tests/SpameriTests
2929

3030
cs:
31-
vendor/bin/phpcs --standard=ruleset.xml --cache=.phpcs-cache src tests
31+
vendor/bin/phpcs --standard=ruleset.xml --cache=.phpcs-cache src tests/SpameriTests
3232

3333
csf:
34-
vendor/bin/phpcbf --standard=ruleset.xml src tests
34+
vendor/bin/phpcbf --standard=ruleset.xml src tests/SpameriTests
3535

3636
coverage:
3737
vendor/bin/tester $COVERAGE -s -c ./tests/php.ini-unix ./tests

tests/SpameriTests/Elastic/Data/Import/MockDataProvider.php

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ class MockDataProvider implements \Spameri\Elastic\Import\DataProviderInterface
1313
*/
1414
private array $data = [];
1515

16-
/**
17-
* @var array<\Spameri\Elastic\Import\Exception\ImportException>
18-
*/
19-
private array $exceptionsToThrow = [];
20-
21-
2216
/**
2317
* @param array<mixed> $data
2418
*/
@@ -28,21 +22,15 @@ public function setData(array $data): void
2822
}
2923

3024

31-
public function setExceptionForItem(int $index, \Spameri\Elastic\Import\Exception\ImportException $exception): void
32-
{
33-
$this->exceptionsToThrow[$index] = $exception;
34-
}
35-
36-
37-
public function provide(\Spameri\Elastic\Import\Run\Options $options): \Generator
25+
public function provide(\Spameri\Elastic\Import\Run\Options $options): \Generator // phpcs:ignore
3826
{
39-
foreach ($this->data as $index => $item) {
27+
foreach ($this->data as $index => $item) { // phpcs:ignore
4028
yield $item;
4129
}
4230
}
4331

4432

45-
public function count(\Spameri\Elastic\Import\Run\Options $options): int
33+
public function count(\Spameri\Elastic\Import\Run\Options $options): int // phpcs:ignore
4634
{
4735
return \count($this->data);
4836
}

tests/SpameriTests/Elastic/Query/MatchAll.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php declare(strict_types = 1);
22

3-
namespace Spameri\ElasticQuery\Query;
3+
namespace SpameriTests\Elastic\Query;
44

55
/**
66
* Match all documents query.
77
*
88
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-all-query.html
99
*/
10-
class MatchAll implements LeafQueryInterface
10+
class MatchAll implements \Spameri\ElasticQuery\Query\LeafQueryInterface
1111
{
1212

1313
public function __construct(
@@ -23,6 +23,9 @@ public function key(): string
2323
}
2424

2525

26+
/**
27+
* @return array<string, mixed>
28+
*/
2629
public function toArray(): array
2730
{
2831
if ($this->boost !== 1.0) {

0 commit comments

Comments
 (0)