Showing 3,272 of 4,939 total issues
Method createCompletionClosure
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function createCompletionClosure(CompletionRequest $request, CodeBase $code_base): Closure
{
/**
* @param list<Node> $parent_node_list
*/
Method combineArrayTypeListsOverriding
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function combineArrayTypeListsOverriding(array $left_types, array $right_types, bool $is_assignment, bool $is_real): array
{
if ($is_real && !$right_types) {
return [];
}
Method createMatchConditionAnalyzer
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createMatchConditionAnalyzer($match_case_node): array
{
$match_kind = ($match_case_node->kind ?? null);
try {
if ($match_kind === ast\AST_VAR) {
Method warnAboutPossiblyThrownType
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function warnAboutPossiblyThrownType(
Node $node,
FunctionInterface $analyzed_function,
UnionType $union_type,
FunctionInterface $call = null
Method checkInvalidArrayShapeCombination
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function checkInvalidArrayShapeCombination(
CodeBase $code_base,
Context $context,
Node $node,
UnionType $left,
Method getVariableFromScope
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
final public function getVariableFromScope(Node $var_node, Context $context): ?Variable
{
if ($var_node->kind !== ast\AST_VAR) {
return null;
}
Method initInner
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function initInner(): void
{
/**
* @param Node $node
*/
Method getReturnTypeOverrides
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Method __construct
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct(
int $comment_flags,
array $variable_list,
array $parameter_list,
array $template_type_list,
Method setValue
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function setValue(string $name, $value): void
{
self::$configuration[$name] = $value;
switch ($name) {
case 'ignore_undeclared_functions_with_known_signatures':
Method handleTraitAlias
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
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");
AnnotatedUnionType
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class AnnotatedUnionType extends UnionType
{
protected const DEFINITELY_UNDEFINED = 1;
/**
LiteralFloatType
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
final class LiteralFloatType extends FloatType implements LiteralTypeInterface
{
/** @var float $value */
private $value;
LiteralIntType
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
final class LiteralIntType extends IntType implements LiteralTypeInterface
{
/** @var int $value */
private $value;
GenericIterableType
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
final class GenericIterableType extends IterableType
{
/** @phan-override */
public const NAME = 'iterable';
ReachabilityChecker
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
final class ReachabilityChecker extends KindVisitorImplementation
{
/** @var Node the node we're checking for reachability. */
private $inner;
Method hasInternalFunctionWithFQSEN
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function hasInternalFunctionWithFQSEN(
FullyQualifiedFunctionName $fqsen
): bool {
$canonical_fqsen = $fqsen->withAlternateId(0);
$found = isset($this->internal_function_fqsen_set[$canonical_fqsen]);
Method getConstantByNameInContext
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConstantByNameInContext(
CodeBase $code_base,
string $name,
Context $context
): ClassConstant {
Method parameterFromCommentLine
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function parameterFromCommentLine(
string $line,
bool $is_var,
int $i
): Parameter {
Method analyzeSingleThrowType
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function analyzeSingleThrowType(
CodeBase $code_base,
FunctionInterface $method,
Type $type
): bool {