protected function castSetting($key, $value)
    {
        if (is_null($value)) {
            return $value;
        }

        if (!in_array($key, $this->notBooleans) && in_array($value, ['0', '1'])) {
            return (bool) $value;
        }

        return $value;
    }
protected function castSetting($key, $value)
    {
        if (is_null($value)) {
            return $value;
        }

        if (!in_array($key, $this->notBooleans) && in_array($value, ['0', '1'])) {
            return (bool) $value;
        }

        return $value;
    }
protected function castSetting ( $ key , $ value ) { if ( is_null ( $ value ) ) { return $ value ; } if ( ! in_array ( $ key , $ this -> notBooleans ) && in_array ( $ value , [ '0' , '1' ] ) ) { return ( bool ) $ value ; } return $ value ; }
Cast setting as the applicable type.

@param string $key
@param string $value

@return mixed
Cast setting as the applicable type .