wikimedia/mediawiki-extensions-Wikibase

View on GitHub

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,
Severity: Minor
Found in repo/includes/Rdf/Values/GlobeCoordinateRdfBuilder.php - About 45 mins to fix

    Method addValue has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            RdfWriter $writer,
            $propertyValueNamespace,
            $propertyValueLName,
            $dataType,
            $snakNamespace,
    Severity: Minor
    Found in repo/includes/Rdf/Values/MonolingualTextRdfBuilder.php - About 45 mins to fix

      Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              Statement $statement,
              GuidGenerator $guidGenerator,
              StatementGuidValidator $guidValidator,
              StatementGuidParser $guidParser,
              SnakValidator $snakValidator,
      Severity: Minor
      Found in repo/includes/ChangeOp/ChangeOpStatement.php - About 45 mins to fix

        Method attemptSave has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                EntityDocument $newEntity,
                string $summary,
                $flags,
                $token,
                $watch = null,
        Severity: Minor
        Found in repo/includes/EditEntity/StatsdSaveTimeRecordingEditEntity.php - About 45 mins to fix

          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;
                  }
          Severity: Minor
          Found in repo/includes/Rdf/TermsRdfBuilder.php - About 45 mins to fix

          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,
          Severity: Minor
          Found in repo/includes/Rdf/Values/QuantityRdfBuilder.php - About 45 mins to fix

            Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    EntityNamespaceLookup $namespaceChecker,
                    SubscriptionLookup $subscriptionLookup,
                    SiteLookup $siteLookup,
                    EntityIdLookup $entityIdLookup,
                    IContextSource $context,
            Severity: Minor
            Found in repo/includes/Hooks/InfoActionHookHandler.php - About 45 mins to fix

              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;
              Severity: Minor
              Found in repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php - About 45 mins to fix

              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,
              Severity: Minor
              Found in repo/includes/Rdf/FullStatementRdfBuilderFactory.php - About 45 mins to fix

                Method addValue has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        RdfWriter $writer,
                        $propertyValueNamespace,
                        $propertyValueLName,
                        $dataType,
                        $snakNamespace,
                Severity: Minor
                Found in repo/includes/Rdf/DispatchingValueSnakRdfBuilder.php - About 45 mins to fix

                  Method addValue has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          RdfWriter $writer,
                          $propertyValueNamespace,
                          $propertyValueLName,
                          $dataType,
                          $snakNamespace,
                  Severity: Minor
                  Found in repo/includes/Rdf/Values/ExternalIdentifierRdfBuilder.php - About 45 mins to fix

                    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' );
                            }
                    
                    
                    Severity: Minor
                    Found in repo/includes/ChangeOp/ChangeOpDescription.php - About 45 mins to fix

                    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,
                    Severity: Minor
                    Found in repo/includes/Rdf/ValueSnakRdfBuilder.php - About 45 mins to fix

                      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 {
                      Severity: Minor
                      Found in repo/includes/LinkedData/EntityDataRequestHandler.php - About 45 mins to fix

                      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,
                      Severity: Minor
                      Found in repo/includes/Rdf/TruthyStatementRdfBuilderFactory.php - About 45 mins to fix

                        Method addValue has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                RdfWriter $writer,
                                $propertyValueNamespace,
                                $propertyValueLName,
                                $dataType,
                                $snakNamespace,
                        Severity: Minor
                        Found in repo/includes/Rdf/Values/EntityIdRdfBuilder.php - About 45 mins to fix

                          Method doHtmlPageLinkRendererEnd has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  LinkRenderer $linkRenderer,
                                  Title $target,
                                  &$text,
                                  array &$customAttribs,
                                  RequestContext $context,
                          Severity: Minor
                          Found in repo/includes/Hooks/HtmlPageLinkRendererEndHookHandler.php - About 45 mins to fix

                            Method internalDoHtmlPageLinkRendererEnd has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    LinkRenderer $linkRenderer,
                                    Title $target,
                                    &$text,
                                    array &$customAttribs,
                                    RequestContext $context,
                            Severity: Minor
                            Found in repo/includes/Hooks/HtmlPageLinkRendererEndHookHandler.php - About 45 mins to fix

                              Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      EntityIdParser $entityIdParser,
                                      EntityDataUriManager $entityDataUriManager,
                                      RepoDomainDb $repoDb,
                                      HTMLCacheUpdater $htmlCacheUpdater,
                                      int $batchSize,
                              Severity: Minor
                              Found in repo/includes/PurgeEntityDataJob.php - About 45 mins to fix

                                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' );
                                        }
                                
                                
                                Severity: Minor
                                Found in repo/includes/ChangeOp/ChangeOpLabel.php - About 45 mins to fix

                                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

                                Severity
                                Category
                                Status
                                Source
                                Language