Showing 3,272 of 4,939 total issues

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

    final public function updateVariableToBeNotEqual(
        Node $var_node,
        $expr,
        Context $context = null
    ): Context {
Severity: Minor
Found in src/Phan/Analysis/ConditionVisitorUtil.php - About 1 hr to fix

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

        public function visitContinue(Node $node): Context
        {
            $nodes = $this->parent_node_list;
            $depth = $node->children['depth'] ?? 1;
            if (!\is_int($depth)) {
    Severity: Minor
    Found in src/Phan/Analysis/PostOrderAnalysisVisitor.php - About 1 hr to fix

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

          public function visitDim(Node $node): Context
          {
              $code_base = $this->code_base;
              $context = $this->context;
              // Check the dimension type to trigger PhanUndeclaredVariable, etc.
      Severity: Minor
      Found in src/Phan/Analysis/PostOrderAnalysisVisitor.php - About 1 hr to fix

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

            private static function analyzeOverrideSignature(
                CodeBase $code_base,
                Method $method
            ): void {
                if (!Config::getValue('analyze_signature_compatibility')) {
        Severity: Minor
        Found in src/Phan/Analysis/ParameterTypesAnalyzer.php - About 1 hr to fix

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

              private static function guessErrorColumnUsingPolyfill(
                  CodeBase $code_base,
                  Context $context,
                  string $file_path,
                  FileCacheEntry $file_cache_entry,
          Severity: Minor
          Found in src/Phan/AST/Parser.php - About 1 hr to fix

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

                public function visitCast(Node $node): UnionType
                {
                    // This calls unionTypeFromNode to trigger any warnings
                    // TODO: Check if the cast would throw an error at runtime, based on the type (e.g. casting object to string/int)
            
            
            Severity: Minor
            Found in src/Phan/AST/UnionTypeVisitor.php - About 1 hr to fix

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

                  public function visitName(Node $node): UnionType
                  {
                      $name = $node->children['name'];
                      try {
                          if ($node->flags & \ast\flags\NAME_NOT_FQ) {
              Severity: Minor
              Found in src/Phan/AST/UnionTypeVisitor.php - About 1 hr to fix

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

                    private function analyzeUnpack(Node $node, bool $is_array_spread): UnionType
                    {
                        $union_type = self::unionTypeFromNode(
                            $this->code_base,
                            $this->context,
                Severity: Minor
                Found in src/Phan/AST/UnionTypeVisitor.php - About 1 hr to fix

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

                      public function resolveClassNameInContext(): ?FullyQualifiedClassName
                      {
                          // A function argument to resolve into an FQSEN
                          $arg = $this->node;
                  
                  
                  Severity: Minor
                  Found in src/Phan/AST/ContextNode.php - About 1 hr to fix

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

                        protected static function printUsageAndExit(int $exit_code = 1): void
                        {
                            global $argv;
                            $program_name = $argv[0];
                            $msg = <<<EOT
                    Severity: Minor
                    Found in internal/lib/IncompatibleSignatureDetectorBase.php - About 1 hr to fix

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

                          public function parseMethodSignature(string $class_name, string $method_name): ?array
                          {
                              $this->initStubs();
                              if ($class_name[0] !== '\\') {
                                  $class_name = '\\' . $class_name;
                      Severity: Minor
                      Found in internal/lib/IncompatibleStubsSignatureDetector.php - About 1 hr to fix

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

                            protected function getAvailablePropertyPHPDocSummaries(): array
                            {
                                return $this->memoize(__METHOD__, /** @return array<string,string> */ function (): array {
                                    $code_base = $this->code_base;
                                    $map = [];
                        Severity: Minor
                        Found in internal/lib/IncompatibleStubsSignatureDetector.php - About 1 hr to fix

                          Method afterAnalyzeFile has 30 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/InlineHTMLPlugin.php - About 1 hr to fix

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

                                public function parseMethodSignature(string $class_name, string $method_name): ?array
                                {
                                    $this->initStubs();
                                    if ($class_name[0] !== '\\') {
                                        $class_name = '\\' . $class_name;
                            Severity: Minor
                            Found in internal/lib/IncompatibleRealStubsSignatureDetector.php - About 1 hr to fix

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

                                  protected function getAvailablePropertyPHPDocSummaries(): array
                                  {
                                      return $this->memoize(__METHOD__, /** @return array<string,string> */ function (): array {
                                          $code_base = $this->code_base;
                                          $map = [];
                              Severity: Minor
                              Found in internal/lib/IncompatibleRealStubsSignatureDetector.php - About 1 hr to fix

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

                                    private function checkPropGroupDescription(Clazz $class, Node $node): ?ClassElementEntry
                                    {
                                        $property_name = $node->children['props']->children[0]->children['name'] ?? null;
                                        if (!is_string($property_name)) {
                                            return null;
                                Severity: Minor
                                Found in .phan/plugins/HasPHPDocPlugin.php - About 1 hr to fix

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

                                      public function visitSwitch(Node $node): void
                                      {
                                          // Check all case statements and return if something that isn't a no-op is seen.
                                          foreach ($node->children['stmts']->children ?? [] as $c) {
                                              if (!$c instanceof Node) {
                                  Severity: Minor
                                  Found in .phan/plugins/EmptyStatementListPlugin.php - About 1 hr to fix

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

                                        public function visitClass(Node $node): void
                                        {
                                            if (!$this->context->isInClassScope()) {
                                                // should be impossible
                                                return;
                                    Severity: Minor
                                    Found in .phan/plugins/AvoidableGetterPlugin.php - About 1 hr to fix

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

                                          public function generateCompletions(string $text, int $start, int $end): array
                                          {
                                              $this->setReadlineConfig('completion_append_character', "\x00");
                                              try {
                                                  // TODO: PHP's API only allows us to fetch the most recent line.
                                      Severity: Minor
                                      Found in tool/phan_repl_helpers.php - About 1 hr to fix

                                        Method addGlobalConstantsByNames has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private function addGlobalConstantsByNames(array $const_name_list): void
                                            {
                                                $included_extension_subset = self::getIncludedExtensionSubset();
                                                if (is_array($included_extension_subset)) {
                                                    $excluded_constant_set = [];
                                        Severity: Minor
                                        Found in src/Phan/CodeBase.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language