File ChangeTagsStore.php
has 588 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
Method updateTags
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateTags( $tagsToAdd, $tagsToRemove, &$rc_id = null,
&$rev_id = null, &$log_id = null, $params = null, RecentChange $rc = null,
UserIdentity $user = null
) {
$tagsToAdd = array_filter(
Function modifyDisplayQueryBuilder
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function modifyDisplayQueryBuilder(
SelectQueryBuilder $queryBuilder,
$table,
$filter_tag = '',
bool $exclude = false
- 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"
Further reading
Function modifyDisplayQuery
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function modifyDisplayQuery( &$tables, &$fields, &$conds,
&$join_conds, &$options, $filter_tag = '', bool $exclude = false
) {
$useTagFilter = $this->options->get( MainConfigNames::UseTagFilter );
- 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"
Further reading
Function updateTags
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function updateTags( $tagsToAdd, $tagsToRemove, &$rc_id = null,
&$rev_id = null, &$log_id = null, $params = null, RecentChange $rc = null,
UserIdentity $user = null
) {
$tagsToAdd = array_filter(
- 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"
Further reading
Method modifyDisplayQuery
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function modifyDisplayQuery( &$tables, &$fields, &$conds,
&$join_conds, &$options, $filter_tag = '', bool $exclude = false
) {
$useTagFilter = $this->options->get( MainConfigNames::UseTagFilter );
Method modifyDisplayQueryBuilder
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function modifyDisplayQueryBuilder(
SelectQueryBuilder $queryBuilder,
$table,
$filter_tag = '',
bool $exclude = false
Method updateTags
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function updateTags( $tagsToAdd, $tagsToRemove, &$rc_id = null,
&$rev_id = null, &$log_id = null, $params = null, RecentChange $rc = null,
UserIdentity $user = null
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
IConnectionProvider $dbProvider,
NameTableStore $changeTagDefStore,
WANObjectCache $wanCache,
HookContainer $hookContainer,
LoggerInterface $logger,
Method modifyDisplayQuery
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function modifyDisplayQuery( &$tables, &$fields, &$conds,
&$join_conds, &$options, $filter_tag = '', bool $exclude = false
Method logTagManagementAction
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function logTagManagementAction( string $action, string $tag, string $reason,
UserIdentity $user, $tagCount = null, array $logEntryTags = []
Method addTags
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addTags( $tags, $rc_id = null, $rev_id = null,
$log_id = null, $params = null, RecentChange $rc = null