Smile-SA/elasticsuite

View on GitHub
src/module-elasticsuite-core/Search/Request/Query/MoreLikeThis.php

Summary

Maintainability
B
4 hrs
Test Coverage

MoreLikeThis has 16 functions (exceeds 10 allowed). Consider refactoring.
Open

class MoreLikeThis implements QueryInterface
{
    /**
     * @var string
     */
Severity: Minor
Found in src/module-elasticsuite-core/Search/Request/Query/MoreLikeThis.php - About 3 hrs to fix

    Method __construct has 13 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            array $fields,
            $like,
            $minimumShouldMatch = self::DEFAULT_MINIMUM_SHOULD_MATCH,
            $boostTerms = self::DEFAULT_BOOST_TERMS,
            $minTermFreq = self::DEFAULT_MIN_TERM_FREQ,
    Severity: Major
    Found in src/module-elasticsuite-core/Search/Request/Query/MoreLikeThis.php - About 1 hr to fix

      Declaration of function setName($name) : \Smile\ElasticsuiteCore\Search\Request\Query\MoreLikeThis should be compatible with function setName(string $name) : \Smile\ElasticsuiteCore\Search\Request\QueryInterface (method returning '\Smile\ElasticsuiteCore\Search\Request\Query\MoreLikeThis' cannot override method returning '\Smile\ElasticsuiteCore\Search\Request\QueryInterface') defined in /code/src/module-elasticsuite-core/Search/Request/QueryInterface.php:50
      Open

          public function setName($name): self

      Declaration of function setName($name) : \Smile\ElasticsuiteCore\Search\Request\Query\MoreLikeThis should be compatible with function setName(string $name) : \Smile\ElasticsuiteCore\Search\Request\QueryInterface (parameter #1 with no type cannot replace original parameter with type 'string') defined in /code/src/module-elasticsuite-core/Search/Request/QueryInterface.php:50
      Open

          public function setName($name): self

      Default value for int $includeOriginalDocs can't be false
      Open

          public function __construct(

      Default value for int $minimumShouldMatch can't be string
      Open

          public function __construct(

      There are no issues that match your filters.

      Category
      Status