Simplify ternary operators

This commit is contained in:
Nathan van der Werf 2018-08-15 19:26:20 +02:00
parent 8b6f11e6ac
commit ee9414f3fd
3 changed files with 3 additions and 5 deletions

View File

@ -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;

View File

@ -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));
}
/**

View File

@ -229,7 +229,7 @@ class VersionManager
$history->delete();
}
return (($countHistory + $countVersions) > 0) ? true : false;
return ($countHistory + $countVersions) > 0;
}
//