Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

converting if ($foo != false) to if ($foo)

  • Loading branch information...
commit 8dc4de5de8454a55b961def4efc5c47ffa6af0f6 1 parent b1f26b5
@dogmatic69 dogmatic69 authored
View
2  lib/Cake/Controller/Component/EmailComponent.php
@@ -316,7 +316,7 @@ public function send($content = null, $template = null, $layout = null) {
foreach ($this->headers as $key => $value) {
$headers['X-' . $key] = $value;
}
- if ($this->date != false) {
+ if ($this->date) {
$headers['Date'] = $this->date;
}
$lib->setHeaders($headers);
View
2  lib/Cake/Controller/Scaffold.php
@@ -146,7 +146,7 @@ public function __construct(Controller $controller, CakeRequest $request) {
$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);
}
View
2  lib/Cake/Model/Model.php
@@ -2561,7 +2561,7 @@ public function exists($id = null) {
* @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));
}
/**
View
2  lib/Cake/View/Helper/CacheHelper.php
@@ -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);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.