Remove redundant ternary operator with boolean values

This commit is contained in:
Giuseppe Criscione 2018-07-13 10:35:49 +02:00
parent baa6bec9cf
commit 2d6ca911de
4 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ class Fields extends Collection
public function has($field)
{
return isset($this->items[$field]) ? true : false;
return isset($this->items[$field]);
}
public function get($field)

View File

@ -31,7 +31,7 @@ class Validator
public static function validateCheckbox($value)
{
return empty($value) ? false : true;
return !empty($value);
}
public static function validateDate($value)

View File

@ -19,7 +19,7 @@ class Files extends Collection
public function has($file)
{
return isset($this->items[$file]) ? true : false;
return isset($this->items[$file]);
}
public function path()

View File

@ -230,7 +230,7 @@ class FileSystem
public static function write($file, $content, $append = false)
{
$flag = $append ? FILE_APPEND : null;
return (file_put_contents($file, $content, $flag) !== false) ? true : false;
return file_put_contents($file, $content, $flag) !== false;
}
public static function createFile($file)