From 882b5cf3c7a8641593ac958fca404c17750ce14b Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 29 Oct 2013 13:20:27 +0100 Subject: [PATCH] Shorter syntax use && for and use || for or --- FormBuilder.php | 8 ++++---- HtmlBuilder.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/FormBuilder.php b/FormBuilder.php index 9413792..4dc2a41 100755 --- a/FormBuilder.php +++ b/FormBuilder.php @@ -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); } /** diff --git a/HtmlBuilder.php b/HtmlBuilder.php index d6699cf..cdf48bf 100755 --- a/HtmlBuilder.php +++ b/HtmlBuilder.php @@ -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 'attributes($attributes).'>'.$this->entities($title).''; }