From 0aaeb650da3c96498893bca8277af156f3856e19 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Tue, 5 Nov 2019 08:41:00 +0100 Subject: [PATCH] Remove unneeded psalm asserts (#146) --- src/Assert.php | 18 ------------------ tests/static-analysis/assert-alpha.php | 14 -------------- tests/static-analysis/assert-email.php | 15 --------------- tests/static-analysis/assert-ip.php | 15 --------------- tests/static-analysis/assert-ipv4.php | 15 --------------- tests/static-analysis/assert-ipv6.php | 15 --------------- tests/static-analysis/assert-same.php | 16 ---------------- .../assert-startsWithLetter.php | 15 --------------- 8 files changed, 123 deletions(-) delete mode 100644 tests/static-analysis/assert-alpha.php delete mode 100644 tests/static-analysis/assert-email.php delete mode 100644 tests/static-analysis/assert-ip.php delete mode 100644 tests/static-analysis/assert-ipv4.php delete mode 100644 tests/static-analysis/assert-ipv6.php delete mode 100644 tests/static-analysis/assert-same.php delete mode 100644 tests/static-analysis/assert-startsWithLetter.php diff --git a/src/Assert.php b/src/Assert.php index b94699e2..f117d968 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -694,8 +694,6 @@ public static function false($value, $message = '') } /** - * @psalm-assert string $value - * * @param mixed $value * @param string $message * @@ -713,8 +711,6 @@ public static function ip($value, $message = '') } /** - * @psalm-assert string $value - * * @param mixed $value * @param string $message * @@ -732,8 +728,6 @@ public static function ipv4($value, $message = '') } /** - * @psalm-assert string $value - * * @param mixed $value * @param string $message * @@ -751,8 +745,6 @@ public static function ipv6($value, $message = '') } /** - * @psalm-assert string $value - * * @param mixed $value * @param string $message * @@ -829,10 +821,6 @@ public static function notEq($value, $expect, $message = '') } /** - * @psalm-template ExpectedType - * @psalm-param ExpectedType $expect - * @psalm-assert =ExpectedType $value - * * @param mixed $value * @param mixed $expect * @param string $message @@ -1052,8 +1040,6 @@ public static function startsWith($value, $prefix, $message = '') } /** - * @psalm-assert string $value - * * @param mixed $value * @param string $message * @@ -1135,8 +1121,6 @@ public static function notRegex($value, $pattern, $message = '') } /** - * @psalm-assert !numeric $value - * * @param mixed $value * @param string $message * @@ -1155,8 +1139,6 @@ public static function unicodeLetters($value, $message = '') } /** - * @psalm-assert string $value - * * @param mixed $value * @param string $message * diff --git a/tests/static-analysis/assert-alpha.php b/tests/static-analysis/assert-alpha.php deleted file mode 100644 index 9b25c4f7..00000000 --- a/tests/static-analysis/assert-alpha.php +++ /dev/null @@ -1,14 +0,0 @@ -