mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
converting if ($foo != false) to if ($foo)
This commit is contained in:
parent
b1f26b59a3
commit
8dc4de5de8
4 changed files with 4 additions and 4 deletions
|
@ -316,7 +316,7 @@ class EmailComponent extends Component {
|
|||
foreach ($this->headers as $key => $value) {
|
||||
$headers['X-' . $key] = $value;
|
||||
}
|
||||
if ($this->date != false) {
|
||||
if ($this->date) {
|
||||
$headers['Date'] = $this->date;
|
||||
}
|
||||
$lib->setHeaders($headers);
|
||||
|
|
|
@ -146,7 +146,7 @@ class Scaffold {
|
|||
$this->controller->viewClass = 'Scaffold';
|
||||
}
|
||||
$this->_validSession = (
|
||||
isset($this->controller->Session) && $this->controller->Session->valid() != false
|
||||
isset($this->controller->Session) && $this->controller->Session->valid()
|
||||
);
|
||||
$this->_scaffold($request);
|
||||
}
|
||||
|
|
|
@ -2561,7 +2561,7 @@ class Model extends Object implements CakeEventListener {
|
|||
* @return boolean True if such a record exists
|
||||
*/
|
||||
public function hasAny($conditions = null) {
|
||||
return ($this->find('count', array('conditions' => $conditions, 'recursive' => -1)) != false);
|
||||
return (bool)$this->find('count', array('conditions' => $conditions, 'recursive' => -1));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -59,7 +59,7 @@ class CacheHelper extends AppHelper {
|
|||
* @return boolean
|
||||
*/
|
||||
protected function _enabled() {
|
||||
return (($this->_View->cacheAction != false)) && (Configure::read('Cache.check') === true);
|
||||
return $this->_View->cacheAction && (Configure::read('Cache.check') === true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue