Showing 6 of 4,939 total issues

Consider simplifying this complex logical expression.
Open

        if (!$this->comment_flags &&
            !$this->return_comment &&
            !$this->parameter_list &&
            !$this->variable_list &&
            !$this->template_type_list &&
Severity: Critical
Found in src/Phan/Language/Element/Comment/Builder.php - About 3 hrs to fix

    Consider simplifying this complex logical expression.
    Open

            if ($left_is_array_like
                && !$right->hasArrayLike()
                && !$right_can_cast_to_array
                && !$right->isEmpty()
                && !$right->containsNullable()
    Severity: Critical
    Found in src/Phan/Analysis/BinaryOperatorFlagVisitor.php - About 2 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                  if ($union_type->isDefinitelyUndefined()
                      || (!$union_type->isEmpty()
                          && $union_type->isNativeType()
                          && !$union_type->hasTypeMatchingCallback(static function (Type $type): bool {
                              return !$type->isNullableLabeled() && ($type instanceof MixedType || $type instanceof ObjectType);
      Severity: Critical
      Found in src/Phan/AST/ContextNode.php - About 2 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                if ((
                        (
                            $lnode->children['prop'] instanceof Node
                            && $lnode->children['prop']->kind === ast\AST_VAR
                        )
        Severity: Critical
        Found in src/Phan/AST/ContextNode.php - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                  if (!$method->isAbstract()
                      && !$method->isFromPHPDoc()
                      && !$has_interface_class
                      && !$return_type->isEmpty()
                      && !$method->hasReturn()
          Severity: Critical
          Found in src/Phan/Analysis/PostOrderAnalysisVisitor.php - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                        if (!($o_return_union_type->isEqualTo($return_union_type) || (
                            ($o_return_union_type->containsNullable() && !$o_return_union_type->isNull()) && ($o_return_union_type->nonNullableClone()->isEqualTo($return_union_type)))
                            )) {
                            // There is one exception to this in php 7.1 - the pseudo-type "iterable" can replace ArrayAccess/array in a subclass
                            // TODO: Traversable and array work, but Iterator doesn't. Check for those specific cases?
            Severity: Critical
            Found in src/Phan/Analysis/ParameterTypesAnalyzer.php - About 1 hr to fix
              Severity
              Category
              Status
              Source
              Language