From f8f46b954f7de2c5d08d10b43ba0c75b9653a0d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20Lajos?= Date: Wed, 28 Jul 2021 12:35:33 +0200 Subject: [PATCH] removed N::isIntLike, becasue it's esentially the same as is_numeric --- src/N.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/N.php b/src/N.php index ce21630..01d7ae9 100644 --- a/src/N.php +++ b/src/N.php @@ -3,16 +3,6 @@ namespace Shovel; class N { - // N::isIntLike('12') // true - // N::isIntLike(3.14) // true - // N::isIntLike(7) // true - // N::isIntLike('23.5') // false - // N::isIntLike([1, 2, 3]) // false - public static function isIntLike($n): bool - { - return is_int($n) || is_float($n) || (is_string($n) && intval($n) . '' === $n); - } - public static function toInt($n): ?int { return $n === null ? null : intval($n);