Showing 2,096 of 2,096 total issues
Method addValueNode
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,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Statement $statement,
GuidGenerator $guidGenerator,
StatementGuidValidator $guidValidator,
StatementGuidParser $guidParser,
SnakValidator $snakValidator,
Method attemptSave
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityDocument $newEntity,
string $summary,
$flags,
$token,
$watch = null,
Function addLabels
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function addLabels( $entityNamespace, $entityLName, TermList $labels, array $labelPredicates ) {
if ( !$labelPredicates ) {
// If we want no predicates, no need to bother with the rest.
return;
}
- 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 __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"