PHP type casting

This commit is contained in:
Alexander Mohorev
2014-10-25 15:30:03 +03:00
parent bfb62167f3
commit bb8550886e
27 changed files with 43 additions and 43 deletions

View File

@ -636,7 +636,7 @@ class BaseHtml
*/
public static function radio($name, $checked = false, $options = [])
{
$options['checked'] = (boolean) $checked;
$options['checked'] = (bool) $checked;
$value = array_key_exists('value', $options) ? $options['value'] : '1';
if (isset($options['uncheck'])) {
// add a hidden field so that if the radio button is not selected, it still submits a value
@ -678,7 +678,7 @@ class BaseHtml
*/
public static function checkbox($name, $checked = false, $options = [])
{
$options['checked'] = (boolean) $checked;
$options['checked'] = (bool) $checked;
$value = array_key_exists('value', $options) ? $options['value'] : '1';
if (isset($options['uncheck'])) {
// add a hidden field so that if the checkbox is not selected, it still submits a value

View File

@ -81,7 +81,7 @@ class BaseUrl
*/
public static function toRoute($route, $scheme = false)
{
$route = (array)$route;
$route = (array) $route;
$route[0] = static::normalizeRoute($route[0]);
if ($scheme) {