Simplify ternary operators
This commit is contained in:
parent
8b6f11e6ac
commit
ee9414f3fd
|
|
@ -195,7 +195,7 @@ class Filter extends WidgetBase
|
|||
break;
|
||||
|
||||
case 'checkbox':
|
||||
$checked = post('value') == 'true' ? true : false;
|
||||
$checked = post('value') == 'true';
|
||||
$this->setScopeValue($scope, $checked);
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -300,9 +300,7 @@ class PluginManager
|
|||
*/
|
||||
public function exists($id)
|
||||
{
|
||||
return (!$this->findByIdentifier($id) || $this->isDisabled($id))
|
||||
? false
|
||||
: true;
|
||||
return !(!$this->findByIdentifier($id) || $this->isDisabled($id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ class VersionManager
|
|||
$history->delete();
|
||||
}
|
||||
|
||||
return (($countHistory + $countVersions) > 0) ? true : false;
|
||||
return ($countHistory + $countVersions) > 0;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in New Issue