Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function processNode(Node $node, Scope $scope): array
/**
* @return list<IdentifierRuleError>
*/
public function processConditionNode(Expr $condNode, Scope $scope): array
private function processConditionNode(Expr $condNode, Scope $scope): array
{
$comparisons = $this->unpackOrChain($condNode);
if (count($comparisons) < 2) {
Expand Down
4 changes: 2 additions & 2 deletions src/Analyser/NodeScopeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5089,7 +5089,7 @@ private function processPropertyHooks(
/**
* @param FunctionReflection|MethodReflection|null $calleeReflection
*/
public function resolveClosureThisType(
private function resolveClosureThisType(
?CallLike $call,
$calleeReflection,
ParameterReflection $parameter,
Expand Down Expand Up @@ -7095,7 +7095,7 @@ private function getNextUnreachableStatements(array $nodes, bool $earlyBinding):
/**
* @param array<Expr> $conditions
*/
public function getFilteringExprForMatchArm(Expr\Match_ $expr, array $conditions): BinaryOp\Identical|FuncCall
private function getFilteringExprForMatchArm(Expr\Match_ $expr, array $conditions): BinaryOp\Identical|FuncCall
{
if (count($conditions) === 1) {
return new BinaryOp\Identical($expr->cond, $conditions[0]);
Expand Down
2 changes: 1 addition & 1 deletion src/Analyser/TypeSpecifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ private function specifyTypesFromConditionalReturnType(
/**
* @param array<string, Expr> $argsMap
*/
public function getConditionalSpecifiedTypes(
private function getConditionalSpecifiedTypes(
ConditionalTypeForParameter $conditionalType,
Type $leftType,
Type $rightType,
Expand Down
2 changes: 1 addition & 1 deletion src/Parallel/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
final class Process
{

public \React\ChildProcess\Process $process;
private \React\ChildProcess\Process $process;

private ?WritableStreamInterface $in = null;

Expand Down
2 changes: 1 addition & 1 deletion src/Reflection/ResolvedFunctionVariantWithOriginal.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function getReturnTypeWithUnresolvableTemplateTypes(): Type
);
}

public function getPhpDocReturnTypeWithUnresolvableTemplateTypes(): Type
private function getPhpDocReturnTypeWithUnresolvableTemplateTypes(): Type
{
return $this->phpDocReturnTypeWithUnresolvableTemplateTypes ??=
$this->resolveConditionalTypesForParameter(
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Comparison/ConstantConditionRuleHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(
{
}

public function shouldSkip(Scope $scope, Expr $expr): bool
private function shouldSkip(Scope $scope, Expr $expr): bool
{
if (
$expr instanceof Expr\BinaryOp\Equal
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Methods/MethodParameterComparisonHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public function compare(ExtendedMethodReflection $prototype, ClassReflection $pr
return $messages;
}

public function isParameterTypeCompatible(Type $methodParameterType, Type $prototypeParameterType, bool $supportsContravariance): bool
private function isParameterTypeCompatible(Type $methodParameterType, Type $prototypeParameterType, bool $supportsContravariance): bool
{
return $this->isTypeCompatible($methodParameterType, $prototypeParameterType, $supportsContravariance, false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Type/OperatorTypeSpecifyingExtensionRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(
/**
* @return OperatorTypeSpecifyingExtension[]
*/
public function getOperatorTypeSpecifyingExtensions(string $operator, Type $leftType, Type $rightType): array
private function getOperatorTypeSpecifyingExtensions(string $operator, Type $leftType, Type $rightType): array
{
return array_values(array_filter($this->extensions, static fn (OperatorTypeSpecifyingExtension $extension): bool => $extension->isOperatorSupported($operator, $leftType, $rightType)));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Php/DateFunctionReturnTypeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function getTypeFromFormatType(Type $formatType, bool $useMicrosec): Type
return $type;
}

public function buildReturnTypeFromFormat(string $formatString, bool $useMicrosec): Type
private function buildReturnTypeFromFormat(string $formatString, bool $useMicrosec): Type
{
// see see https://www.php.net/manual/en/datetime.format.php
switch ($formatString) {
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Php/FilterFunctionReturnTypeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct(private ReflectionProvider $reflectionProvider, priv
$this->flagsString = new ConstantStringType('flags');
}

public function getOffsetValueType(Type $inputType, Type $offsetType, ?Type $filterType, ?Type $flagsType): Type
private function getOffsetValueType(Type $inputType, Type $offsetType, ?Type $filterType, ?Type $flagsType): Type
{
$inexistentOffsetType = $this->hasFlag('FILTER_NULL_ON_FAILURE', $flagsType)
? new ConstantBooleanType(false)
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Php/FilterVarArrayDynamicReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
}

/** @return array{?Type, ?Type} */
public function fetchFilter(Type $type): array
private function fetchFilter(Type $type): array
{
if (!$type->isArray()->yes()) {
return [$type, null];
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Php/IdateFunctionReturnTypeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getTypeFromFormatType(Type $formatType): ?Type
return TypeCombinator::union(...$types);
}

public function buildReturnTypeFromFormat(string $formatString): Type
private function buildReturnTypeFromFormat(string $formatString): Type
{
// see https://www.php.net/idate and https://www.php.net/manual/de/datetime.format
switch ($formatString) {
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Regex/RegexNonCapturingGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function __construct(
}

/** @phpstan-assert-if-true !null $this->getAlternationId() */
public function inAlternation(): bool
private function inAlternation(): bool
{
return $this->alternation !== null;
}
Expand Down
Loading