Showing 3,272 of 4,939 total issues

Method findVariableReuse has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function findVariableReuse(array $variables): void
    {
        if (!$variables) {
            return;
        }
Severity: Minor
Found in src/Phan/Plugin/Internal/LoopVariableReuseVisitor.php - About 1 hr to fix

    Method visitFuncDecl has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function visitFuncDecl(Node $node): Context
        {
            $function_name = (string)$node->children['name'];
            $context = $this->context;
            $code_base = $this->code_base;
    Severity: Minor
    Found in src/Phan/Parse/ParseVisitor.php - About 1 hr to fix

      Method updateVariableWithNewType has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          final protected function updateVariableWithNewType(
              Node $var_node,
              Context $context,
              UnionType $new_union_type,
              bool $suppress_issues,
      Severity: Minor
      Found in src/Phan/Analysis/ConditionVisitorUtil.php - About 1 hr to fix

        Method print has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function print(IssueInstance $instance): void
            {
                $issue = $instance->getIssue();
                $message = HTML::htmlTemplate(
                    $issue->getTemplateRaw(),
        Severity: Minor
        Found in src/Phan/Output/Printer/HTMLPrinter.php - About 1 hr to fix

          Method analyzeAbstractMethodsAreImplemented has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function analyzeAbstractMethodsAreImplemented(
                  CodeBase $code_base,
                  Clazz $class
              ): void {
                  // Don't worry about internal classes
          Severity: Minor
          Found in src/Phan/Analysis/AbstractMethodAnalyzer.php - About 1 hr to fix

            Method analyzeFunction has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function analyzeFunction(
                    CodeBase $code_base,
                    Func $function
                ): void {
                    if ($function->isPHPInternal()) {
            Severity: Minor
            Found in .phan/plugins/HasPHPDocPlugin.php - About 1 hr to fix

              Method visitIf has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function visitIf(Node $node): Context
                  {
                      // Here, we visit the group of if/elseif/else instead of the individuals (visitIfElem)
                      // so that we have the Union types of the variables **before** the PreOrderAnalysisVisitor makes inferences
                      foreach ($node->children as $if_node) {
              Severity: Minor
              Found in .phan/plugins/NonBoolBranchPlugin.php - About 1 hr to fix

                Method analyzeFunctionLike has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private static function analyzeFunctionLike(CodeBase $code_base, FunctionInterface $method): void
                    {
                        if (Phan::isExcludedAnalysisFile($method->getContext()->getFile())) {
                            // This has no side effects, so we can skip files that don't need to be analyzed
                            return;
                Severity: Minor
                Found in .phan/plugins/PHPDocToRealTypesPlugin.php - About 1 hr to fix

                  Method tokenizeRegexParts has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private static function tokenizeRegexParts(string $inner): Generator
                      {
                          $inner_len = strlen($inner);
                          for ($j = 0; $j < $inner_len;) {
                              switch ($c = $inner[$j]) {
                  Severity: Minor
                  Found in .phan/plugins/PregRegexCheckerPlugin.php - About 1 hr to fix

                    Method outputProgressLine has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function outputProgressLine(string $msg, float $p, float $memory, float $peak, ?int $offset = null, ?int $count = null): void
                        {
                            if (self::shouldShowLongProgress()) {
                                self::showLongProgress($msg, $p, $memory, $offset, $count);
                                return;
                    Severity: Minor
                    Found in src/Phan/CLI.php - About 1 hr to fix

                      Method setMagicPropertyMap has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function setMagicPropertyMap(
                              array $magic_property_map,
                              CodeBase $code_base
                          ): bool {
                              if (count($magic_property_map) === 0) {
                      Severity: Minor
                      Found in src/Phan/Language/Element/Clazz.php - About 1 hr to fix

                        Method getSettersMap has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function getSettersMap(CodeBase $code_base): array
                            {
                                return $this->memoize(
                                    __METHOD__,
                                    /**
                        Severity: Minor
                        Found in src/Phan/Language/Element/Clazz.php - About 1 hr to fix

                          Method magicParamFromMagicMethodParamString has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function magicParamFromMagicMethodParamString(
                                  string $param_string,
                                  int $param_index,
                                  int $comment_line_offset
                              ): ?Parameter {
                          Severity: Minor
                          Found in src/Phan/Language/Element/Comment/Builder.php - About 1 hr to fix

                            Method mergeMethodParts has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private static function mergeMethodParts(array $parts): array
                                {
                                    $prev_parts = [];
                                    $delta = 0;
                                    $results = [];
                            Severity: Minor
                            Found in src/Phan/Language/Element/Comment/Builder.php - About 1 hr to fix

                              Method returnTypeFromCommentLine has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function returnTypeFromCommentLine(
                                      string $line,
                                      int $i
                                  ): UnionType {
                                      $return_union_type_string = '';
                              Severity: Minor
                              Found in src/Phan/Language/Element/Comment/Builder.php - About 1 hr to fix

                                Method fromStringInContext has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public static function fromStringInContext(
                                        string $fqsen_string,
                                        Context $context
                                    ) {
                                        // Check to see if we're fully qualified
                                Severity: Minor
                                Found in src/Phan/Language/FQSEN/FullyQualifiedGlobalStructuralElement.php - About 1 hr to fix

                                  Method mergeTypeParts has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private static function mergeTypeParts(array $parts): array
                                      {
                                          $prev_parts = [];
                                          $delta = 0;
                                          $results = [];
                                  Severity: Minor
                                  Found in src/Phan/Language/UnionType.php - About 1 hr to fix

                                    Method canPossiblyCastToClass has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function canPossiblyCastToClass(CodeBase $code_base, Type $other): bool
                                        {
                                            if (!$this->isPossiblyObject()) {
                                                return false;
                                            }
                                    Severity: Minor
                                    Found in src/Phan/Language/Type.php - About 1 hr to fix

                                      Method analyzeAndGetUpdatedContextAndAssertTruthy has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function analyzeAndGetUpdatedContextAndAssertTruthy(
                                              Context $context,
                                              Node $parent_node,
                                              $condition_node
                                          ): Context {
                                      Severity: Minor
                                      Found in src/Phan/BlockAnalysisVisitor.php - About 1 hr to fix

                                        Method visitIf has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function visitIf(Node $node): VariableTrackingScope
                                            {
                                                $outer_scope = $this->scope;
                                        
                                                $inner_scope_list = [];
                                        Severity: Minor
                                        Found in src/Phan/Plugin/Internal/VariableTracker/VariableTrackerVisitor.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language