Showing 718 of 718 total issues
Method build
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ClusterSettings $cluster,
string $updateGroup,
string $method,
array $arguments,
array $params = [],
Method onPageDeleteComplete
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function onPageDeleteComplete( ProperPageIdentity $page, Authority $deleter,
string $reason, int $pageID, RevisionRecord $deletedRev, ManualLogEntry $logEntry,
int $archivedRevisionCount
Method onPageMoveComplete
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$old, $new, $user, $pageid, $redirid,
$reason, $revision
Method build
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function build( $fromPageId, $toPageId, $delay, $profile, $cluster, $loopId, \JobQueueGroup $jobQueueGroup ) {
Method sendUpdateWeightedTags
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $indexSuffix,
array $docIds,
string $tagField,
string $tagPrefix,
$tagNames = null,
Method onPageMoveComplete
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function onPageMoveComplete( $old, $new, $user, $pageid, $redirid, $reason, $revision ) {
Method factory
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ConfigFactory $configFactory,
Config $mainConfig,
GlobalIdGenerator $globalIdGenerator,
TitleFormatter $titleFormatter,
PageLookup $pageLookup,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
SearchQuery $query,
$index,
$queryTemplate,
$suggestionField,
array $queryParams,
Method createIndex
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$rebuild,
$maxShardsPerNode,
$shardCount,
$replicaCount,
$refreshInterval,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
SearchConfig $searchConfig,
Connection $source,
Connection $target,
Index $index,
Index $oldIndex,
Method onShowSearchHitTitle
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function onShowSearchHitTitle( &$title, &$text, $result, $terms, $page, &$query, &$attributes ) {
Method doApplyExtended
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function doApplyExtended( SearchContext $context, $key, $value, $quotedValue, $negated, $delimiter, $suffix );
Method doApplyExtended
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
SearchContext $context,
$key,
$value,
$quotedValue,
$negated,
Method doApplyExtended
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function doApplyExtended( SearchContext $context, $key, $value, $quotedValue, $negated, $delimiter, $suffix ) {
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Connection $connection,
IReadableDatabase $db,
RevisionStore $revStore,
BacklinkCacheFactory $backlinkCacheFactory,
DocumentSizeLimiter $docSizeLimiter,
Method doApplyExtended
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function doApplyExtended( SearchContext $context, $key, $value, $quotedValue, $negated,
$delimiter, $suffix
Method onPageDeleteComplete
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function onPageDeleteComplete( ProperPageIdentity $page, Authority $deleter,
string $reason, int $pageID, RevisionRecord $deletedRev, ManualLogEntry $logEntry,
int $archivedRevisionCount
Function decideClusters
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function decideClusters( string $updateGroup ) {
$params = $this->getParams();
$searchConfig = $this->getSearchConfig();
$jobType = $this->getType();
- 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 onPageSaveComplete
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function onPageSaveComplete( $wikiPage, $user, $summary, $flags, $revisionRecord, $editResult ) {
Function pushElasticaWriteJobs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function pushElasticaWriteJobs( string $updateGroup, array $items, $factory, int $batchSize = 10 ): void {
// Elasticsearch has a queue capacity of 50 so if $documents contains 50 pages it could bump up
// against the max. So we chunk it and do them sequentially.
$jobs = [];
$config = $this->connection->getConfig();
- 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"