Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Escaped mutants:
- ================
- Timed Out mutants:
- ==================
- Not Covered mutants:
- ====================
- 1) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:49 [M] PublicVisibility
- --- Original
- +++ New
- @@ @@
- /**
- * Static method for instantiating a new query.
- */
- - public static function search($value) : self
- + protected static function search($value) : self
- {
- return new static($value);
- }
- 2) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:66 [M] PublicVisibility
- --- Original
- +++ New
- @@ @@
- /**
- * Attaches an index to the query.
- */
- - public function in(string $index, string $type = null) : self
- + protected function in(string $index, string $type = null) : self
- {
- $this->build['index'] = $index;
- if ($type) {
- 3) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:82 [M] PublicVisibility
- --- Original
- +++ New
- @@ @@
- *
- * @param string $field
- */
- - public function match(string $field) : self
- + protected function match(string $field) : self
- {
- $this->queries[] = ['match' => [$field => ['query' => $this->value]]];
- return $this;
- 4) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:87 [M] ArrayItem
- --- Original
- +++ New
- @@ @@
- */
- public function match(string $field) : self
- {
- - $this->queries[] = ['match' => [$field => ['query' => $this->value]]];
- + $this->queries[] = ['match' => [$field => ['query' > $this->value]]];
- return $this;
- }
- /**
- 5) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:103 [M] PublicVisibility
- --- Original
- +++ New
- @@ @@
- * @param string[] $fields
- * @param string $type The type of match to perform. Accepts: best_fields, most_fields, cross_fields, phrase, phrase_prefix.
- */
- - public function matches(array $fields, string $type = 'best_fields') : self
- + protected function matches(array $fields, string $type = 'best_fields') : self
- {
- $this->queries[] = ['multi_match' => ['query' => $this->value, 'fields' => $fields, 'type' => $type]];
- return $this;
- 6) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:107 [M] ArrayItem
- --- Original
- +++ New
- @@ @@
- */
- public function matches(array $fields, string $type = 'best_fields') : self
- {
- - $this->queries[] = ['multi_match' => ['query' => $this->value, 'fields' => $fields, 'type' => $type]];
- + $this->queries[] = ['multi_match' => ['query' > $this->value, 'fields' => $fields, 'type' => $type]];
- return $this;
- }
- /**
- 7) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:123 [M] OneZeroFloat
- --- Original
- +++ New
- @@ @@
- *
- * @param float $boost The _score parameter.
- */
- - public function matchAll(float $boost = 1.0) : self
- + public function matchAll(float $boost = 0.0) : self
- {
- $this->queries[] = ['match_all' => ['boost' => $boost]];
- return $this;
- 8) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:123 [M] PublicVisibility
- --- Original
- +++ New
- @@ @@
- *
- * @param float $boost The _score parameter.
- */
- - public function matchAll(float $boost = 1.0) : self
- + protected function matchAll(float $boost = 1.0) : self
- {
- $this->queries[] = ['match_all' => ['boost' => $boost]];
- return $this;
- 9) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:139 [M] PublicVisibility
- --- Original
- +++ New
- @@ @@
- /**
- * Generates a match_none query.
- */
- - public function matchNone() : self
- + protected function matchNone() : self
- {
- $this->queries[] = ['match_none' => []];
- return $this;
- 10) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:156 [M] DecrementInteger
- --- Original
- +++ New
- @@ @@
- */
- private function makeBody() : array
- {
- - if (count($this->queries) <= 0) {
- + if (count($this->queries) <= -1) {
- return $this->queries;
- }
- return ['body' => ['query' => array_merge(...$this->queries)]];
- }
- 11) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:156 [M] OneZeroInteger
- --- Original
- +++ New
- @@ @@
- */
- private function makeBody() : array
- {
- - if (count($this->queries) <= 0) {
- + if (count($this->queries) <= 1) {
- return $this->queries;
- }
- return ['body' => ['query' => array_merge(...$this->queries)]];
- }
- 12) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:156 [M] LessThanOrEqualTo
- --- Original
- +++ New
- @@ @@
- */
- private function makeBody() : array
- {
- - if (count($this->queries) <= 0) {
- + if (count($this->queries) < 0) {
- return $this->queries;
- }
- return ['body' => ['query' => array_merge(...$this->queries)]];
- }
- 13) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:156 [M] LessThanOrEqualToNegotiation
- --- Original
- +++ New
- @@ @@
- */
- private function makeBody() : array
- {
- - if (count($this->queries) <= 0) {
- + if (count($this->queries) > 0) {
- return $this->queries;
- }
- return ['body' => ['query' => array_merge(...$this->queries)]];
- }
- 14) /home/vagrant/code/elasticsearch-php-wrapper/src/Builder.php:160 [M] ArrayItem
- --- Original
- +++ New
- @@ @@
- if (count($this->queries) <= 0) {
- return $this->queries;
- }
- - return ['body' => ['query' => array_merge(...$this->queries)]];
- + return ['body' => ['query' > array_merge(...$this->queries)]];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement