Skip to content

Commit 5aaecd6

Browse files
committed
refactor: clean up parentheses on ternary
1 parent dede747 commit 5aaecd6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

system/Helpers/form_helper.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ function set_select(string $field, string $value = '', bool $default = false): s
582582
}
583583

584584
if ($input === null) {
585-
return ($default) ? ' selected="selected"' : '';
585+
return $default ? ' selected="selected"' : '';
586586
}
587587

588588
if (is_array($input)) {
@@ -636,7 +636,7 @@ function set_checkbox(string $field, string $value = '', bool $default = false):
636636
return ($input === $value) ? ' checked="checked"' : '';
637637
}
638638

639-
return ($default) ? ' checked="checked"' : '';
639+
return $default ? ' checked="checked"' : '';
640640
}
641641
}
642642

@@ -673,7 +673,7 @@ function set_radio(string $field, string $value = '', bool $default = false): st
673673
return ((string) $input === $value) ? ' checked="checked"' : '';
674674
}
675675

676-
return ($default) ? ' checked="checked"' : '';
676+
return $default ? ' checked="checked"' : '';
677677
}
678678
}
679679

system/Pager/Pager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public function getPageURI(?int $page = null, string $group = 'default', bool $r
288288
$uri->setQueryArray($query);
289289
}
290290

291-
return ($returnObject)
291+
return $returnObject
292292
? $uri
293293
: URI::createURIString(
294294
$uri->getScheme(),

0 commit comments

Comments
 (0)