From 34f8ac6b6e16b704073444f39ac6e11434c45f8a Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sun, 3 Nov 2024 14:44:11 +0700 Subject: [PATCH] Update to use PHP 8.1 syntax Signed-off-by: Abdul Malik Ikhsan --- src/Escaper.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Escaper.php b/src/Escaper.php index c4964cb..a20120e 100644 --- a/src/Escaper.php +++ b/src/Escaper.php @@ -159,19 +159,13 @@ public function __construct(?string $encoding = null) // set matcher callbacks $this->htmlAttrMatcher = /** @param array $matches */ - function (array $matches): string { - return $this->htmlAttrMatcher($matches); - }; + fn(array $matches): string => $this->htmlAttrMatcher($matches); $this->jsMatcher = /** @param array $matches */ - function (array $matches): string { - return $this->jsMatcher($matches); - }; + fn(array $matches): string => $this->jsMatcher($matches); $this->cssMatcher = /** @param array $matches */ - function (array $matches): string { - return $this->cssMatcher($matches); - }; + fn(array $matches): string => $this->cssMatcher($matches); } /**