No nested ternary operators
https://github.com/dseguy/clearPHP/blob/master/rules/no-nested-ternary.md Signed-off-by: Marc Delisle <marc@infomarc.info>
This commit is contained in:
parent
4b4603cc6a
commit
f4358bb74b
@ -136,9 +136,15 @@ class IndexColumn
|
||||
*/
|
||||
public function getNull($as_text = false)
|
||||
{
|
||||
return $as_text
|
||||
? (!$this->_null || $this->_null == 'NO' ? __('No') : __('Yes'))
|
||||
: $this->_null;
|
||||
if ($as_text) {
|
||||
if (!$this->_null || $this->_null == 'NO') {
|
||||
return __('No');
|
||||
} else {
|
||||
return __('Yes');
|
||||
}
|
||||
} else {
|
||||
return $this->_null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user