Shorter syntax use && for and use || for or
This commit is contained in:
1 parent
8ee51fa8a2
commit
882b5cf3c7
2 files changed
+5
-5
No files matched your search
+4
-4
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user