Skip to content

Commit a305dab

Browse files
committed
fix: coding style
1 parent de4c495 commit a305dab

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Type/Php/PregSplitDynamicReturnTypeExtension.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
use function count;
3030
use function is_array;
3131
use function is_int;
32+
use function is_numeric;
3233
use function preg_split;
3334
use function strtolower;
3435

3536
final class PregSplitDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
3637
{
37-
3838
public function __construct(
3939
private BitwiseFlagHelper $bitwiseFlagAnalyser,
4040
)
@@ -156,7 +156,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
156156
foreach ($subjectConstantTypes as $subjectConstantType) {
157157
foreach ($limits as $limit) {
158158
foreach ($flags as $flag) {
159-
$result = @preg_split($patternConstantType->getValue(), $subjectConstantType->getValue(), (int)$limit, (int)$flag);
159+
$result = @preg_split($patternConstantType->getValue(), $subjectConstantType->getValue(), (int) $limit, (int) $flag);
160160
if ($result === false) {
161161
return new ErrorType();
162162
}
@@ -178,24 +178,24 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
178178
}
179179
}
180180
}
181-
182181
return TypeCombinator::union(...$resultTypes);
182+
183183
}
184184

185185
/**
186186
* @param ConstantStringType[] $patternConstantArray
187187
* @param ConstantStringType[] $subjectConstantArray
188-
* @return bool
189188
*/
190-
private function isPatternOrSubjectEmpty(array $patternConstantArray, array $subjectConstantArray): bool {
189+
private function isPatternOrSubjectEmpty(array $patternConstantArray, array $subjectConstantArray): bool
190+
{
191191
return count($patternConstantArray) === 0 || count($subjectConstantArray) === 0;
192192
}
193193

194194
private function isValidPattern(string $pattern): bool
195195
{
196196
try {
197197
Strings::match('', $pattern);
198-
} catch (RegexpException $e) {
198+
} catch (RegexpException) {
199199
return false;
200200
}
201201
return true;

0 commit comments

Comments
 (0)