Shorter syntax use && for and use || for or

This commit is contained in:
Lucas committed 2013-10-29 13:20:27 +01:00
1 parent 8ee51fa8a2
commit 882b5cf3c7
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -115,7 +115,7 @@ class FormBuilder {
// different method than it actually is, for convenience from the forms.
$append = $this->getAppendage($method);
if (isset($options['files']) and $options['files'])
if (isset($options['files']) && $options['files'])
{
$options['enctype'] = 'multipart/form-data';
}
@@ -629,7 +629,7 @@ class FormBuilder {
*/
protected function getCheckboxCheckedState($name, $value, $checked)
{
if ( ! $this->oldInputIsEmpty() and is_null($this->old($name))) return false;
if ( ! $this->oldInputIsEmpty() && is_null($this->old($name))) return false;
if ($this->missingOldAndModel($name)) return $checked;
@@ -661,7 +661,7 @@ class FormBuilder {
*/
protected function missingOldAndModel($name)
{
return (is_null($this->old($name)) and is_null($this->getModelValueAttribute($name)));
return (is_null($this->old($name)) && is_null($this->getModelValueAttribute($name)));
}
/**
@@ -937,7 +937,7 @@ class FormBuilder {
*/
public function oldInputIsEmpty()
{
return (isset($this->session) and count($this->session->getOldInput()) == 0);
return (isset($this->session) && count($this->session->getOldInput()) == 0);
}
/**
+1 -1
View File
@@ -123,7 +123,7 @@ class HtmlBuilder {
{
$url = $this->url->to($url, array(), $secure);
if (is_null($title) or $title === false) $title = $url;
if (is_null($title) || $title === false) $title = $url;
return '<a href="'.$url.'"'.$this->attributes($attributes).'>'.$this->entities($title).'</a>';
}