Skip to content

Commit e487dc7

Browse files
committed
Fix CS
1 parent 7efb688 commit e487dc7

4 files changed

+10
-10
lines changed

src/GetTaxonomiesDynamicFunctionReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
//phpcs:disable SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
3+
// phpcs:disable SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
44

55
/**
66
* Set return type of get_taxonomies().

src/GetTermsDynamicFunctionReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
//phpcs:disable SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
3+
// phpcs:disable SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
44

55
/**
66
* Set return type of get_terms() and related functions.

src/TermExistsDynamicFunctionReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
//phpcs:disable SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
3+
// phpcs:disable SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
44

55
/**
66
* Set return type of term_exists().

src/WpParseUrlFunctionDynamicReturnTypeExtension.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
// phpcs:disable WordPress.WP.AlternativeFunctions.parse_url_parse_url
4+
35
/**
46
* Set return type of wp_parse_url().
57
*
@@ -19,7 +21,6 @@
1921
use PHPStan\Type\Constant\ConstantIntegerType;
2022
use PHPStan\Type\Constant\ConstantStringType;
2123
use PHPStan\Type\ConstantType;
22-
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
2324
use PHPStan\Type\IntegerType;
2425
use PHPStan\Type\NullType;
2526
use PHPStan\Type\StringType;
@@ -38,16 +39,15 @@
3839
use const PHP_URL_SCHEME;
3940
use const PHP_URL_USER;
4041

41-
final class WpParseUrlFunctionDynamicReturnTypeExtension implements DynamicFunctionReturnTypeExtension
42+
final class WpParseUrlFunctionDynamicReturnTypeExtension implements \PHPStan\Type\DynamicFunctionReturnTypeExtension
4243
{
43-
44-
/** @var array<int,Type>|null */
44+
/** @var array<int, \PHPStan\Type\Type>|null */
4545
private $componentTypesPairedConstants = null;
4646

47-
/** @var array<string,Type>|null */
47+
/** @var array<string, \PHPStan\Type\Type>|null */
4848
private $componentTypesPairedStrings = null;
4949

50-
/** @var Type|null */
50+
/** @var \PHPStan\Type\Type|null */
5151
private $allComponentsTogetherType = null;
5252

5353
public function isFunctionSupported(FunctionReflection $functionReflection): bool
@@ -84,6 +84,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
8484

8585
if ($urlType instanceof ConstantStringType) {
8686
try {
87+
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged,Generic.PHP.NoSilencedErrors.Discouraged
8788
$result = @parse_url($urlType->getValue(), $componentType->getValue());
8889
} catch (\ValueError $e) {
8990
return new ConstantBooleanType(false);
@@ -160,5 +161,4 @@ private function cacheReturnTypes(): void
160161
'fragment' => $string,
161162
];
162163
}
163-
164164
}

0 commit comments

Comments
 (0)