Showing 3,272 of 4,939 total issues

Method createCompletionClosure has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function createCompletionClosure(CompletionRequest $request, CodeBase $code_base): Closure
    {
        /**
         * @param list<Node> $parent_node_list
         */
Severity: Major
Found in src/Phan/LanguageServer/CompletionResolver.php - About 2 hrs to fix

    Method combineArrayTypeListsOverriding has 64 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private static function combineArrayTypeListsOverriding(array $left_types, array $right_types, bool $is_assignment, bool $is_real): array
        {
            if ($is_real && !$right_types) {
                return [];
            }
    Severity: Major
    Found in src/Phan/Language/Type/ArrayType.php - About 2 hrs to fix

      Method createMatchConditionAnalyzer has 64 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function createMatchConditionAnalyzer($match_case_node): array
          {
              $match_kind = ($match_case_node->kind ?? null);
              try {
                  if ($match_kind === ast\AST_VAR) {
      Severity: Major
      Found in src/Phan/BlockAnalysisVisitor.php - About 2 hrs to fix

        Method warnAboutPossiblyThrownType has 64 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function warnAboutPossiblyThrownType(
                Node $node,
                FunctionInterface $analyzed_function,
                UnionType $union_type,
                FunctionInterface $call = null
        Severity: Major
        Found in src/Phan/Plugin/Internal/ThrowAnalyzerPlugin.php - About 2 hrs to fix

          Method checkInvalidArrayShapeCombination has 64 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function checkInvalidArrayShapeCombination(
                  CodeBase $code_base,
                  Context $context,
                  Node $node,
                  UnionType $left,
          Severity: Major
          Found in src/Phan/Analysis/BinaryOperatorFlagVisitor.php - About 2 hrs to fix

            Method getVariableFromScope has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                final public function getVariableFromScope(Node $var_node, Context $context): ?Variable
                {
                    if ($var_node->kind !== ast\AST_VAR) {
                        return null;
                    }
            Severity: Major
            Found in src/Phan/Analysis/ConditionVisitorUtil.php - About 2 hrs to fix

              Method initInner has 64 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private static function initInner(): void
                  {
                      /**
                       * @param Node $node
                       */
              Severity: Major
              Found in src/Phan/AST/PhanAnnotationAdder.php - About 2 hrs to fix

                Method getReturnTypeOverrides has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getReturnTypeOverrides(CodeBase $code_base): array
                    {
                        $string_union_type = StringType::instance(false)->asPHPDocUnionType();
                        /**
                         * @param list<Node|string|int|float> $args the nodes for the arguments to the invocation
                Severity: Major
                Found in .phan/plugins/PrintfCheckerPlugin.php - About 2 hrs to fix

                  Method __construct has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function __construct(
                          int $comment_flags,
                          array $variable_list,
                          array $parameter_list,
                          array $template_type_list,
                  Severity: Major
                  Found in src/Phan/Language/Element/Comment.php - About 2 hrs to fix

                    Method setValue has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function setValue(string $name, $value): void
                        {
                            self::$configuration[$name] = $value;
                            switch ($name) {
                                case 'ignore_undeclared_functions_with_known_signatures':
                    Severity: Major
                    Found in src/Phan/Config.php - About 2 hrs to fix

                      Method handleTraitAlias has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function handleTraitAlias(array $adaptations_map, Node $adaptation_node): void
                          {
                              $trait_method_node = $adaptation_node->children['method'];
                              if (!$trait_method_node instanceof Node) {
                                  throw new AssertionError("Expected node for trait alias");
                      Severity: Major
                      Found in src/Phan/AST/ContextNode.php - About 2 hrs to fix

                        AnnotatedUnionType has 23 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class AnnotatedUnionType extends UnionType
                        {
                            protected const DEFINITELY_UNDEFINED = 1;
                        
                            /**
                        Severity: Minor
                        Found in src/Phan/Language/AnnotatedUnionType.php - About 2 hrs to fix

                          LiteralFloatType has 23 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          final class LiteralFloatType extends FloatType implements LiteralTypeInterface
                          {
                              /** @var float $value */
                              private $value;
                          
                          
                          Severity: Minor
                          Found in src/Phan/Language/Type/LiteralFloatType.php - About 2 hrs to fix

                            LiteralIntType has 23 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            final class LiteralIntType extends IntType implements LiteralTypeInterface
                            {
                                /** @var int $value */
                                private $value;
                            
                            
                            Severity: Minor
                            Found in src/Phan/Language/Type/LiteralIntType.php - About 2 hrs to fix

                              GenericIterableType has 23 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              final class GenericIterableType extends IterableType
                              {
                                  /** @phan-override */
                                  public const NAME = 'iterable';
                              
                              
                              Severity: Minor
                              Found in src/Phan/Language/Type/GenericIterableType.php - About 2 hrs to fix

                                ReachabilityChecker has 23 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                final class ReachabilityChecker extends KindVisitorImplementation
                                {
                                    /** @var Node the node we're checking for reachability. */
                                    private $inner;
                                
                                
                                Severity: Minor
                                Found in src/Phan/Analysis/ReachabilityChecker.php - About 2 hrs to fix

                                  Method hasInternalFunctionWithFQSEN has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function hasInternalFunctionWithFQSEN(
                                          FullyQualifiedFunctionName $fqsen
                                      ): bool {
                                          $canonical_fqsen = $fqsen->withAlternateId(0);
                                          $found = isset($this->internal_function_fqsen_set[$canonical_fqsen]);
                                  Severity: Major
                                  Found in src/Phan/CodeBase.php - About 2 hrs to fix

                                    Method getConstantByNameInContext has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function getConstantByNameInContext(
                                            CodeBase $code_base,
                                            string $name,
                                            Context $context
                                        ): ClassConstant {
                                    Severity: Major
                                    Found in src/Phan/Language/Element/Clazz.php - About 2 hrs to fix

                                      Method parameterFromCommentLine has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function parameterFromCommentLine(
                                              string $line,
                                              bool $is_var,
                                              int $i
                                          ): Parameter {
                                      Severity: Major
                                      Found in src/Phan/Language/Element/Comment/Builder.php - About 2 hrs to fix

                                        Method analyzeSingleThrowType has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private static function analyzeSingleThrowType(
                                                CodeBase $code_base,
                                                FunctionInterface $method,
                                                Type $type
                                            ): bool {
                                        Severity: Major
                                        Found in src/Phan/Analysis/ThrowsTypesAnalyzer.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language