Showing 3,272 of 4,939 total issues

Method checkPropertyCompatibility has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private static function checkPropertyCompatibility(
        CodeBase $code_base,
        Property $inherited_property,
        Property $overriding_property
    ): void {
Severity: Minor
Found in src/Phan/Language/Element/Clazz.php - About 1 hr to fix

    Method analyzeBinaryBoolAnd has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Method analyzeBinaryBoolOr has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method isMatchingNamespaceUseDeclaration has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private static function isMatchingNamespaceUseDeclaration(
                string $file_contents,
                NamespaceUseDeclaration $declaration,
                IssueInstance $issue_instance
            ): bool {
        Severity: Minor
        Found in src/Phan/Plugin/Internal/IssueFixingPlugin/IssueFixer.php - About 1 hr to fix

          Method runWithoutPcntl has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private static function runWithoutPcntl(CodeBase $code_base, Closure $file_path_lister): void
              {
                  // This is a single threaded server, it only analyzes one TCP request at a time
                  $socket_server = self::createDaemonStreamSocketServer();
                  try {
          Severity: Minor
          Found in src/Phan/Daemon.php - About 1 hr to fix

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

                public function visitCast(Node $node): void
                {
                    // TODO: Check if the cast would throw an error at runtime, based on the type (e.g. casting object to string/int)
                    $expr_type = UnionTypeVisitor::unionTypeFromNode($this->code_base, $this->context, $node->children['expr']);
                    if (!$expr_type->hasRealTypeSet()) {
            Severity: Minor
            Found in src/Phan/Plugin/Internal/RedundantConditionVisitor.php - About 1 hr to fix

              Method emitIssueForInArray has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private static function emitIssueForInArray(CodeBase $code_base, Context $context, array $args, ?Node $node): void
                  {
                      [$needle_node, $haystack_node] = $args;
                      $needle = UnionTypeVisitor::unionTypeFromNode($code_base, $context, $needle_node);
                      $haystack = UnionTypeVisitor::unionTypeFromNode($code_base, $context, $haystack_node);
              Severity: Minor
              Found in src/Phan/Plugin/Internal/MiscParamPlugin.php - About 1 hr to fix

                Method emitIssueForArrayKeyExists has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private static function emitIssueForArrayKeyExists(CodeBase $code_base, Context $context, array $args, ?Node $node): void
                    {
                        [$key_node, $array_node] = $args;
                        $key_type = UnionTypeVisitor::unionTypeFromNode($code_base, $context, $key_node);
                        $array_type = UnionTypeVisitor::unionTypeFromNode($code_base, $context, $array_node);
                Severity: Minor
                Found in src/Phan/Plugin/Internal/MiscParamPlugin.php - About 1 hr to fix

                  Method analyzeBinaryConditionSide has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function analyzeBinaryConditionSide(Node $var_node, $expr_node, BinaryCondition $condition): ?Context
                      {
                          '@phan-var ConditionVisitorUtil|ConditionVisitorInterface $this';
                          $kind = $var_node->kind;
                          if ($kind === ast\AST_VAR || $kind === ast\AST_DIM) {
                  Severity: Minor
                  Found in src/Phan/Analysis/ConditionVisitorUtil.php - About 1 hr to fix

                    Method addPromotedConstructorPropertyFromParam has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function addPromotedConstructorPropertyFromParam(
                            Clazz $class,
                            Method $method,
                            Parameter $parameter,
                            Node $parameter_node
                    Severity: Minor
                    Found in src/Phan/Parse/ParseVisitor.php - About 1 hr to fix

                      Method visitInstanceof has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function visitInstanceof(Node $node): Context
                          {
                              //$this->checkVariablesDefined($node);
                              // Only look at things of the form
                              // `$variable instanceof ClassName`
                      Severity: Minor
                      Found in src/Phan/Analysis/NegatedConditionVisitor.php - About 1 hr to fix

                        Method analyzeUnsetProp has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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

                          Method getReturnTypes has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function getReturnTypes(Context $context, $node, int $return_lineno): \Generator
                              {
                                  if (!($node instanceof Node)) {
                                      if (null === $node) {
                                          yield $return_lineno => [VoidType::instance(false)->asRealUnionType(), null];
                          Severity: Minor
                          Found in src/Phan/Analysis/PostOrderAnalysisVisitor.php - About 1 hr to fix

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

                                public function visitStmtList(Node $node): void
                                {
                                    $child_nodes = $node->children;
                            
                                    $last_node_index = count($child_nodes) - 1;
                            Severity: Minor
                            Found in .phan/plugins/UnreachableCodePlugin.php - About 1 hr to fix

                              Method visitAssign has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function visitAssign(Node $node): void
                                  {
                                      $expr = $node->children['expr'];
                                      if (!$expr instanceof Node) {
                                          // Guaranteed not to contain duplicate expressions in valid php assignments.
                              Severity: Minor
                              Found in .phan/plugins/DuplicateExpressionPlugin.php - About 1 hr to fix

                                Method resolveClassAliasesForAliasSet has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function resolveClassAliasesForAliasSet(FullyQualifiedClassName $original_fqsen, Set $alias_set): void
                                    {
                                        if (!$this->hasClassWithFQSEN($original_fqsen)) {
                                            // The original class does not exist.
                                            // Emit issues at the point of every single class_alias call with that original class.
                                Severity: Minor
                                Found in src/Phan/CodeBase.php - About 1 hr to fix

                                  Method restartWithoutProblematicExtensions has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function restartWithoutProblematicExtensions(): void
                                      {
                                          $extensions_to_disable = [];
                                          if (self::shouldRestartToExclude('xdebug')) {
                                              $extensions_to_disable[] = 'xdebug';
                                  Severity: Minor
                                  Found in src/Phan/CLI.php - About 1 hr to fix

                                    Method fromReflectionParameter has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static function fromReflectionParameter(
                                            \ReflectionParameter $reflection_parameter
                                        ): Parameter {
                                            $flags = 0;
                                            // Check to see if it's a pass-by-reference parameter
                                    Severity: Minor
                                    Found in src/Phan/Language/Element/Parameter.php - About 1 hr to fix

                                      Method setMagicMethodMap has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

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

                                        Method createUseAlias has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function createUseAlias(
                                                Clazz $clazz,
                                                string $alias_method_name,
                                                int $new_visibility_flags
                                            ): Method {
                                        Severity: Minor
                                        Found in src/Phan/Language/Element/Method.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language