File tree Expand file tree Collapse file tree
tests/SpameriTests/Elastic Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,16 +22,16 @@ tests-local:
2222 vendor/bin/tester -j 1 -c ./tests/SpameriTests/php.ini tests
2323
2424phpstan :
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
2727phpstan-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
3030cs :
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
3333csf :
34- vendor/bin/phpcbf --standard=ruleset.xml src tests
34+ vendor/bin/phpcbf --standard=ruleset.xml src tests/SpameriTests
3535
3636coverage :
3737 vendor/bin/tester $COVERAGE -s -c ./tests/php.ini-unix ./tests
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 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 ) {
You can’t perform that action at this time.
0 commit comments