Showing 691 of 718 total issues
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated ) {
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated ) {
Method build
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function build( array $inputDoc, $suggestType, $score, \Elastica\Document $suggestDoc, $targetNamespace ) {
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated ) {
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated ) {
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
abstract protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated );
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated ) {
Method buildRedirectsSuggestion
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function buildRedirectsSuggestion( $docId, array $redirects, $score, array $inputDoc, array $scoreExplanation = null ) {
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct( $start, $end, $phrase, $slop, $stem ) {
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated ) {
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated ) {
Method truncateField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function truncateField( string $field, bool $keyword, int $minFieldLength, int $maxDocSize, string $statBucket ): void {
Method buildTitleSuggestion
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function buildTitleSuggestion( $docId, array $title, $score, array $inputDoc, array $scoreExplanation = null ) {
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated ) {
Method overrideNumeric
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function overrideNumeric( &$dest, $request, $name, $limit = null, $upperLimit = true ) {
Method build
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function build( array $inputDoc, $suggestType, $score, \Elastica\Document $suggestDoc, $targetNamespace ) {
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated ) {
Method doApply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function doApply( SearchContext $context, $key, $value, $quotedValue, $negated ) {
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$name,
$type,
string $indexAnalyzer,
string $searchAnalyzer,
string $similarity
Function formatMessage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
protected static function formatMessage( array $error ) {
if ( isset( $error['actionReasons'] ) ) {
$message = $error['type'] . ': ' . $error['reason'];
foreach ( $error['actionReasons'] as $actionReason ) {
$message .= " - $actionReason\n";
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"