Showing 3,272 of 4,939 total issues

Method emitSignatureRealMismatchIssue has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private static function emitSignatureRealMismatchIssue(
        CodeBase $code_base,
        Method $method,
        Method $o_method,
        string $issue_type,
Severity: Minor
Found in src/Phan/Analysis/ParameterTypesAnalyzer.php - About 1 hr to fix

    Method compareYieldFromAgainstDeclaredType has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function compareYieldFromAgainstDeclaredType(Node $node, FunctionInterface $method, Context $context, array $template_type_list, UnionType $yield_from_type): Context
        {
            $code_base = $this->code_base;
    
            $type_list_count = \count($template_type_list);
    Severity: Minor
    Found in src/Phan/Analysis/PostOrderAnalysisVisitor.php - About 1 hr to fix

      Method buildUses has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function buildUses(Node $n): void
          {
              switch ($n->kind) {
                  case ast\AST_VAR:
                      $name = $n->children['name'];
      Severity: Minor
      Found in src/Phan/AST/ArrowFunc.php - About 1 hr to fix

        Method classListFromClassNameNode has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function classListFromClassNameNode(CodeBase $code_base, Context $context, $node): array
            {
                $results = [];
                $strings = UnionTypeVisitor::unionTypeFromNode($code_base, $context, $node)->asStringScalarValues();
                foreach ($strings as $string) {
        Severity: Minor
        Found in src/Phan/AST/UnionTypeVisitor.php - About 1 hr to fix

          Method getFunctionFromNode has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getFunctionFromNode(bool $return_placeholder_for_undefined = false): iterable
              {
                  $expression = $this->node;
                  if (!($expression instanceof Node)) {
                      if (!\is_string($expression)) {
          Severity: Minor
          Found in src/Phan/AST/ContextNode.php - About 1 hr to fix

            Method main has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static function main(): void
                {
                    Shim::load();
                    global $argv;
                    if (count($argv) !== 2) {
            Severity: Minor
            Found in internal/extract_arg_info.php - About 1 hr to fix

              Method getAnalyzeFunctionCallClosures has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getAnalyzeFunctionCallClosures(CodeBase $code_base): array
                  {
                      /**
                       * @return Closure(CodeBase,Context,Func,array):void
                       */
              Severity: Minor
              Found in .phan/plugins/StrictComparisonPlugin.php - About 1 hr to fix

                Method analyzePattern has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private static function analyzePattern(CodeBase $code_base, Context $context, Func $function, string $pattern): void
                    {
                        /**
                         * @suppress PhanParamSuspiciousOrder 100% deliberate use of varying regex and constant $subject for preg_match
                         * @return ?array<string,mixed>
                Severity: Minor
                Found in .phan/plugins/PregRegexCheckerPlugin.php - About 1 hr to fix

                  Method warnAboutTransientSleepProperties has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function warnAboutTransientSleepProperties(array $sleep_properties): void
                      {
                          if (count($sleep_properties) === 0) {
                              // Give up, failed to extract property names
                              return;
                  Severity: Minor
                  Found in .phan/plugins/SleepCheckerPlugin.php - About 1 hr to fix

                    Method analyzeFunctionLike has 37 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/PHPDocRedundantPlugin.php - About 1 hr to fix

                      Method nodeCanBeStatic has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private static function nodeCanBeStatic(CodeBase $code_base, FunctionInterface $method, $node): bool
                          {
                              if (!($node instanceof Node)) {
                                  if (is_array($node)) {
                                      foreach ($node as $child_node) {
                      Severity: Minor
                      Found in .phan/plugins/PossiblyStaticMethodPlugin.php - About 1 hr to fix

                        Method afterAnalyzeFile has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function afterAnalyzeFile(
                                CodeBase $code_base,
                                Context $context,
                                string $file_contents,
                                Node $node
                        Severity: Minor
                        Found in .phan/plugins/PHPDocInWrongCommentPlugin.php - About 1 hr to fix

                          Method importMixin has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function importMixin(CodeBase $code_base, Type $type): void
                              {
                                  $fqsen = FullyQualifiedClassName::fromType($type);
                                  if (!$code_base->hasClassWithFQSEN($fqsen) || $fqsen === $this->fqsen) {
                                      Issue::maybeEmit(
                          Severity: Minor
                          Found in src/Phan/Language/Element/Clazz.php - About 1 hr to fix

                            Method importAncestorClasses has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function importAncestorClasses(CodeBase $code_base): void
                                {
                                    if (!$this->isFirstExecution(__METHOD__)) {
                                        return;
                                    }
                            Severity: Minor
                            Found in src/Phan/Language/Element/Clazz.php - About 1 hr to fix

                              Method getCommentParamAssertionClosure has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getCommentParamAssertionClosure(CodeBase $code_base): ?Closure
                                  {
                                      if (!\is_object($this->comment)) {
                                          return null;
                                      }
                              Severity: Minor
                              Found in src/Phan/Language/Element/FunctionTrait.php - About 1 hr to fix

                                Method visitMethodCall has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function visitMethodCall(Node $node): void
                                    {
                                        [$parent, $used] = $this->findNonUnaryParentNode($node);
                                        if (!$parent) {
                                            //fwrite(STDERR, "No parent in " . __METHOD__ . "\n");

                                  Method printGraph has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function printGraph(array $graph): void
                                      {
                                          foreach ($graph as $k => $v) {
                                              echo "$k\n";
                                              foreach ($v as $kk => $vv) {
                                  Severity: Minor
                                  Found in src/Phan/Plugin/Internal/DependencyGraphPlugin.php - About 1 hr to fix

                                    Method readMessages has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function readMessages(): void
                                        {
                                            if ($this->eof) {
                                                return;
                                            }
                                    Severity: Minor
                                    Found in src/Phan/ForkPool/Reader.php - About 1 hr to fix

                                      Method visitEmpty has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function visitEmpty(Node $node): Context
                                          {
                                              $context = $this->context;
                                              $var_node = $node->children['expr'];
                                              if (!($var_node instanceof Node)) {
                                      Severity: Minor
                                      Found in src/Phan/Analysis/NegatedConditionVisitor.php - About 1 hr to fix

                                        Method visitClass has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function visitClass(Node $node): Context
                                            {
                                                if ($node->flags & ast\flags\CLASS_ANONYMOUS) {
                                                    $class_name =
                                                        (new ContextNode(
                                        Severity: Minor
                                        Found in src/Phan/Analysis/PreOrderAnalysisVisitor.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language