From 6d3fe1af4c916418dcc4d107c89713aedf32c5c4 Mon Sep 17 00:00:00 2001 From: CosmicAlpha Date: Sun, 9 Feb 2025 14:24:05 -0700 Subject: [PATCH] Replace boolval with (bool) (#316) --- includes/Heading/Heading.php | 2 +- includes/Lister/Lister.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/Heading/Heading.php b/includes/Heading/Heading.php index 6b9f5fe9..23316ab9 100644 --- a/includes/Heading/Heading.php +++ b/includes/Heading/Heading.php @@ -152,7 +152,7 @@ public function setItemAttributes( $attributes ) { * @param bool $show */ public function setShowHeadingCount( $show = false ) { - $this->showHeadingCount = boolval( $show ); + $this->showHeadingCount = (bool)$show; } /** diff --git a/includes/Lister/Lister.php b/includes/Lister/Lister.php index b37f29be..d0c562ae 100644 --- a/includes/Lister/Lister.php +++ b/includes/Lister/Lister.php @@ -417,7 +417,7 @@ public function getTemplateSuffix() { * @param bool $trim */ public function setTrimIncluded( $trim = false ) { - $this->trimIncluded = boolval( $trim ); + $this->trimIncluded = (bool)$trim; } /** @@ -436,7 +436,7 @@ public function getTrimIncluded() { * @param bool $escape */ public function setEscapeLinks( $escape = true ) { - $this->escapeLinks = boolval( $escape ); + $this->escapeLinks = (bool)$escape; } /** @@ -526,7 +526,7 @@ public function setMultiSectionSeparators( ?array $separators ) { * @param bool $include */ public function setIncludePageText( $include = false ) { - $this->includePageText = boolval( $include ); + $this->includePageText = (bool)$include; } /** @@ -571,7 +571,7 @@ public function setPageTextMatchNotRegex( array $pageTextMatchNotRegex = [] ) { * @param bool $parse */ public function setIncludePageParsed( $parse = false ) { - $this->includePageParsed = boolval( $parse ); + $this->includePageParsed = (bool)$parse; } /**