Showing 3,272 of 4,939 total issues

Method finalizeProcess has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function finalizeProcess(CodeBase $code_base): void
    {
        foreach (self::$method_return_types as $type_info) {
            $function = $type_info->function;
            $function_context = $function->getContext();
Severity: Minor
Found in .phan/plugins/MoreSpecificElementTypePlugin.php - About 1 hr to fix

    Method analyzeFunctionLikeParam has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private static function analyzeFunctionLikeParam(CodeBase $code_base, FunctionInterface $method, Node $param_node): void
        {
            $param_type = $param_node->children['type'];
            if (!$param_type instanceof Node) {
                return;
    Severity: Minor
    Found in .phan/plugins/PreferNamespaceUsePlugin.php - About 1 hr to fix

      Method shouldWarnAboutMoreSpecificType has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private static function shouldWarnAboutMoreSpecificType(CodeBase $code_base, UnionType $actual_type, UnionType $declared_return_type): bool
          {
              if ($declared_return_type->isEmpty()) {
                  // There was no phpdoc type declaration, so let UnknownElementTypePlugin warn about that instead of this.
                  // This plugin warns about `@return mixed` but not the absence of a declaration because the former normally prevents phan from inferring something more specific.
      Severity: Minor
      Found in .phan/plugins/MoreSpecificElementTypePlugin.php - About 1 hr to fix

        Method performChecks has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function performChecks(
                AddressableElement $element,
                string $issue_type_for_empty,
                string $message_for_empty,
                string $issue_type_for_unknown_array,
        Severity: Minor
        Found in .phan/plugins/UnknownElementTypePlugin.php - About 1 hr to fix

          Method exportFunctionAndMethodSet has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function exportFunctionAndMethodSet(): array
              {
                  $result = [];
                  foreach ($this->getFunctionAndMethodSet() as $function_or_method) {
                      if ($function_or_method->isPHPInternal()) {
          Severity: Minor
          Found in src/Phan/CodeBase.php - About 1 hr to fix

            Method getUnionTypeRepresentationForIssue has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function getUnionTypeRepresentationForIssue(): string
                {
                    $union_type = $this->getNonVariadicUnionType()->asNormalizedTypes();
                    if ($union_type->isEmpty()) {
                        return '';
            Severity: Minor
            Found in src/Phan/Language/Element/Parameter.php - About 1 hr to fix

              Method importParentClass has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function importParentClass(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 importTraitAdaptations has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function importTraitAdaptations(
                        CodeBase $code_base,
                        Clazz $class,
                        TraitAdaptations $trait_adaptations,
                        Option $type_option
                Severity: Minor
                Found in src/Phan/Language/Element/Clazz.php - About 1 hr to fix

                  Method getAncestorElement has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function getAncestorElement(CodeBase $code_base, FullyQualifiedClassName $ancestor_fqsen, ClassElement $element): ?ClassElement
                      {
                          if (!$code_base->hasClassWithFQSEN($ancestor_fqsen)) {
                              return null;
                          }
                  Severity: Minor
                  Found in src/Phan/Language/Element/Clazz.php - About 1 hr to fix

                    Method emitWrongInheritanceCategoryWarning has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function emitWrongInheritanceCategoryWarning(
                            CodeBase $code_base,
                            Clazz $ancestor,
                            string $expected_inheritance_category,
                            int $lineno
                    Severity: Minor
                    Found in src/Phan/Language/Element/Clazz.php - About 1 hr to fix

                      Method isAccessibleFromClass has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function isAccessibleFromClass(CodeBase $code_base, ?FullyQualifiedClassName $accessing_class_fqsen): bool
                          {
                              if ($this->isPublic()) {
                                  return true;
                              }
                      Severity: Minor
                      Found in src/Phan/Language/Element/ClassElement.php - About 1 hr to fix

                        Method parseMixin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function parseMixin(int $i, string $line, string $annotation_name): void
                            {
                                if (!Config::getValue('read_mixin_annotations')) {
                                    return;
                                }
                        Severity: Minor
                        Found in src/Phan/Language/Element/Comment/Builder.php - About 1 hr to fix

                          Method defaultConstructorForClass has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function defaultConstructorForClass(
                                  Clazz $clazz,
                                  CodeBase $code_base
                              ): Method {
                                  if ($clazz->getFQSEN()->getNamespace() === '\\' && $clazz->hasMethodWithName($code_base, $clazz->getName(), true)) {
                          Severity: Minor
                          Found in src/Phan/Language/Element/Method.php - About 1 hr to fix

                            Method getOverriddenMethods has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getOverriddenMethods(
                                    CodeBase $code_base
                                ): array {
                                    // Get the class that defines this method
                                    $class = $this->getClass($code_base);
                            Severity: Minor
                            Found in src/Phan/Language/Element/Method.php - About 1 hr to fix

                              Method getTemplateTypeExtractorClosure has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getTemplateTypeExtractorClosure(CodeBase $code_base, TemplateType $template_type, int $skip_index = null): ?Closure
                                  {
                                      $closure = null;
                                      foreach ($this->parameter_list as $i => $parameter) {
                                          if ($i === $skip_index) {
                              Severity: Minor
                              Found in src/Phan/Language/Element/FunctionTrait.php - About 1 hr to fix

                                Method canCastToGenericArrayKeys has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function canCastToGenericArrayKeys(GenericArrayType $type, bool $ignore_config = false): bool
                                    {
                                        if ($type instanceof ListType) {
                                            $i = 0;
                                            $has_possibly_undefined = false;
                                Severity: Minor
                                Found in src/Phan/Language/Type/ArrayShapeType.php - About 1 hr to fix

                                  Method withFlattenedArrayShapeTypeInstancesForSet has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private static function withFlattenedArrayShapeTypeInstancesForSet(array $type_set): array
                                      {
                                          $result = [];
                                          $has_other_array_type = false;
                                          $empty_array_shape_type = null;
                                  Severity: Minor
                                  Found in src/Phan/Language/UnionType.php - About 1 hr to fix

                                    Method visitStmtList has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function visitStmtList(Node $node): Context
                                        {
                                            $context = $this->context;
                                            $plugin_set = ConfigPluginSet::instance();
                                            $plugin_set->preAnalyzeNode(
                                    Severity: Minor
                                    Found in src/Phan/BlockAnalysisVisitor.php - About 1 hr to fix

                                      Method visitArray has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function visitArray(Node $node): Context
                                          {
                                              $context = $this->context;
                                              $context->setLineNumberStart($node->lineno);
                                      
                                      
                                      Severity: Minor
                                      Found in src/Phan/BlockAnalysisVisitor.php - About 1 hr to fix

                                        Method visitIfElem has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function visitIfElem(Node $node): Context
                                            {
                                                $context = $this->context->withLineNumberStart(
                                                    $node->lineno
                                                );
                                        Severity: Minor
                                        Found in src/Phan/BlockAnalysisVisitor.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language