Skip to content

Commit

Permalink
Replace boolval with (bool) (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Feb 9, 2025
1 parent 36c17ef commit 6d3fe1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion includes/Heading/Heading.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function setItemAttributes( $attributes ) {
* @param bool $show
*/
public function setShowHeadingCount( $show = false ) {
$this->showHeadingCount = boolval( $show );
$this->showHeadingCount = (bool)$show;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions includes/Lister/Lister.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public function getTemplateSuffix() {
* @param bool $trim
*/
public function setTrimIncluded( $trim = false ) {
$this->trimIncluded = boolval( $trim );
$this->trimIncluded = (bool)$trim;
}

/**
Expand All @@ -436,7 +436,7 @@ public function getTrimIncluded() {
* @param bool $escape
*/
public function setEscapeLinks( $escape = true ) {
$this->escapeLinks = boolval( $escape );
$this->escapeLinks = (bool)$escape;
}

/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 6d3fe1a

Please sign in to comment.