Skip to content

Commit e1a3c67

Browse files
committed
Reduce visibility to private
1 parent 806f1a1 commit e1a3c67

10 files changed

+11
-11
lines changed

build/PHPStan/Build/OrChainIdenticalComparisonToInArrayRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function processNode(Node $node, Scope $scope): array
6161
/**
6262
* @return list<IdentifierRuleError>
6363
*/
64-
public function processConditionNode(Expr $condNode, Scope $scope): array
64+
private function processConditionNode(Expr $condNode, Scope $scope): array
6565
{
6666
$comparisons = $this->unpackOrChain($condNode);
6767
if (count($comparisons) < 2) {

src/Analyser/NodeScopeResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5089,7 +5089,7 @@ private function processPropertyHooks(
50895089
/**
50905090
* @param FunctionReflection|MethodReflection|null $calleeReflection
50915091
*/
5092-
public function resolveClosureThisType(
5092+
private function resolveClosureThisType(
50935093
?CallLike $call,
50945094
$calleeReflection,
50955095
ParameterReflection $parameter,
@@ -7095,7 +7095,7 @@ private function getNextUnreachableStatements(array $nodes, bool $earlyBinding):
70957095
/**
70967096
* @param array<Expr> $conditions
70977097
*/
7098-
public function getFilteringExprForMatchArm(Expr\Match_ $expr, array $conditions): BinaryOp\Identical|FuncCall
7098+
private function getFilteringExprForMatchArm(Expr\Match_ $expr, array $conditions): BinaryOp\Identical|FuncCall
70997099
{
71007100
if (count($conditions) === 1) {
71017101
return new BinaryOp\Identical($expr->cond, $conditions[0]);

src/Analyser/TypeSpecifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ private function specifyTypesFromConditionalReturnType(
14011401
/**
14021402
* @param array<string, Expr> $argsMap
14031403
*/
1404-
public function getConditionalSpecifiedTypes(
1404+
private function getConditionalSpecifiedTypes(
14051405
ConditionalTypeForParameter $conditionalType,
14061406
Type $leftType,
14071407
Type $rightType,

src/Parallel/Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
final class Process
1818
{
1919

20-
public \React\ChildProcess\Process $process;
20+
private \React\ChildProcess\Process $process;
2121

2222
private ?WritableStreamInterface $in = null;
2323

src/Type/OperatorTypeSpecifyingExtensionRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct(
2222
/**
2323
* @return OperatorTypeSpecifyingExtension[]
2424
*/
25-
public function getOperatorTypeSpecifyingExtensions(string $operator, Type $leftType, Type $rightType): array
25+
private function getOperatorTypeSpecifyingExtensions(string $operator, Type $leftType, Type $rightType): array
2626
{
2727
return array_values(array_filter($this->extensions, static fn (OperatorTypeSpecifyingExtension $extension): bool => $extension->isOperatorSupported($operator, $leftType, $rightType)));
2828
}

src/Type/Php/DateFunctionReturnTypeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function getTypeFromFormatType(Type $formatType, bool $useMicrosec): Type
4646
return $type;
4747
}
4848

49-
public function buildReturnTypeFromFormat(string $formatString, bool $useMicrosec): Type
49+
private function buildReturnTypeFromFormat(string $formatString, bool $useMicrosec): Type
5050
{
5151
// see see https://www.php.net/manual/en/datetime.format.php
5252
switch ($formatString) {

src/Type/Php/FilterFunctionReturnTypeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct(private ReflectionProvider $reflectionProvider, priv
5454
$this->flagsString = new ConstantStringType('flags');
5555
}
5656

57-
public function getOffsetValueType(Type $inputType, Type $offsetType, ?Type $filterType, ?Type $flagsType): Type
57+
private function getOffsetValueType(Type $inputType, Type $offsetType, ?Type $filterType, ?Type $flagsType): Type
5858
{
5959
$inexistentOffsetType = $this->hasFlag('FILTER_NULL_ON_FAILURE', $flagsType)
6060
? new ConstantBooleanType(false)

src/Type/Php/FilterVarArrayDynamicReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
176176
}
177177

178178
/** @return array{?Type, ?Type} */
179-
public function fetchFilter(Type $type): array
179+
private function fetchFilter(Type $type): array
180180
{
181181
if (!$type->isArray()->yes()) {
182182
return [$type, null];

src/Type/Php/IdateFunctionReturnTypeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function getTypeFromFormatType(Type $formatType): ?Type
2727
return TypeCombinator::union(...$types);
2828
}
2929

30-
public function buildReturnTypeFromFormat(string $formatString): Type
30+
private function buildReturnTypeFromFormat(string $formatString): Type
3131
{
3232
// see https://www.php.net/idate and https://www.php.net/manual/de/datetime.format
3333
switch ($formatString) {

src/Type/Regex/RegexNonCapturingGroup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function __construct(
1515
}
1616

1717
/** @phpstan-assert-if-true !null $this->getAlternationId() */
18-
public function inAlternation(): bool
18+
private function inAlternation(): bool
1919
{
2020
return $this->alternation !== null;
2121
}

0 commit comments

Comments
 (0)