Showing 1,432 of 2,096 total issues
Method addValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
RdfWriter $writer,
$propertyValueNamespace,
$propertyValueLName,
$dataType,
$snakNamespace,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityNamespaceLookup $namespaceChecker,
SubscriptionLookup $subscriptionLookup,
SiteLookup $siteLookup,
EntityIdLookup $entityIdLookup,
IContextSource $context,
Function getEntity
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function getEntity( OutputPage $out ): ?EntityDocument {
$entityId = $this->getEntityId( $out );
if ( !$entityId ) {
return null;
- 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
RdfVocabulary $vocabulary,
RdfWriter $writer,
ValueSnakRdfBuilderFactory $valueSnakRdfBuilderFactory,
EntityMentionListener $mentionedEntityTracker,
DedupeBag $dedupe,
Method addValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
RdfWriter $writer,
$propertyValueNamespace,
$propertyValueLName,
$dataType,
$snakNamespace,
Method addValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
RdfWriter $writer,
$propertyValueNamespace,
$propertyValueLName,
$dataType,
$snakNamespace,
Function apply
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function apply( EntityDocument $entity, Summary $summary = null ) {
if ( !( $entity instanceof DescriptionsProvider ) ) {
throw new InvalidArgumentException( '$entity must be a DescriptionsProvider' );
}
- 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 addValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
RdfWriter $writer,
$propertyValueNamespace,
$propertyValueLName,
$dataType,
$snakNamespace,
Function getEntityRevision
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function getEntityRevision( EntityId $id, $revision, $allowRedirects = false ) {
$prefixedId = $id->getSerialization();
$redirectRevision = null;
try {
- 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
DedupeBag $dedupe,
RdfVocabulary $vocabulary,
RdfWriter $writer,
ValueSnakRdfBuilderFactory $valueSnakRdfBuilderFactory,
EntityMentionListener $mentionedEntityTracker,
Method addValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
RdfWriter $writer,
$propertyValueNamespace,
$propertyValueLName,
$dataType,
$snakNamespace,
Method doHtmlPageLinkRendererEnd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
LinkRenderer $linkRenderer,
Title $target,
&$text,
array &$customAttribs,
RequestContext $context,
Method internalDoHtmlPageLinkRendererEnd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
LinkRenderer $linkRenderer,
Title $target,
&$text,
array &$customAttribs,
RequestContext $context,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityIdParser $entityIdParser,
EntityDataUriManager $entityDataUriManager,
RepoDomainDb $repoDb,
HTMLCacheUpdater $htmlCacheUpdater,
int $batchSize,
Function apply
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function apply( EntityDocument $entity, Summary $summary = null ) {
if ( !( $entity instanceof LabelsProvider ) ) {
throw new InvalidArgumentException( '$entity must be a LabelsProvider' );
}
- 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 addValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
RdfWriter $writer,
$propertyValueNamespace,
$propertyValueLName,
$dataType,
$snakNamespace,
Method addValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
RdfWriter $writer,
$propertyValueNamespace,
$propertyValueLName,
$dataType,
$snakNamespace,
Function run
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function run( $new, IContextSource $context, string $summary ) {
$filterStatus = Status::newGood();
if ( !$this->hookContainer->isRegistered( 'EditFilterMergedContent' ) ) {
return $filterStatus;
- 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 setServices
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
SqlEntityIdPagerFactory $sqlEntityIdPagerFactory,
array $existingEntityTypes,
array $entityTypesWithoutRdfOutput,
EntityPrefetcher $entityPrefetcher,
EntityRevisionLookup $entityRevisionLookup,
Function __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(
EntityHolder $itemHolder = null,
EntityRedirect $entityRedirect = null,
Title $redirectTitle = null
) {
- 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"