mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-17 21:49:04 +01:00
Remove redundant ternary operator with boolean values
This commit is contained in:
parent
baa6bec9cf
commit
2d6ca911de
@ -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)
|
||||
|
@ -31,7 +31,7 @@ class Validator
|
||||
|
||||
public static function validateCheckbox($value)
|
||||
{
|
||||
return empty($value) ? false : true;
|
||||
return !empty($value);
|
||||
}
|
||||
|
||||
public static function validateDate($value)
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user