From f812cf90326e5957584255593c86e85171cce1e9 Mon Sep 17 00:00:00 2001 From: Piotr Adamczyk Date: Sat, 13 Jan 2024 19:42:08 +0100 Subject: [PATCH] [10.x] feat: add base argument to Stringable->toInteger() (#49670) * feat: add base argument to Stringable->toInteger() * fix: StyleCi --- src/Illuminate/Support/Stringable.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Support/Stringable.php b/src/Illuminate/Support/Stringable.php index c89abb01e41c..144cbb8c5537 100644 --- a/src/Illuminate/Support/Stringable.php +++ b/src/Illuminate/Support/Stringable.php @@ -1281,11 +1281,12 @@ public function toString() /** * Get the underlying string value as an integer. * + * @param int $base * @return int */ - public function toInteger() + public function toInteger($base = 10) { - return intval($this->value); + return intval($this->value, $base); } /**