diff --git a/lib/cache/sfAPCCache.class.php b/lib/cache/sfAPCCache.class.php index a02039f42..c7e7b24dd 100644 --- a/lib/cache/sfAPCCache.class.php +++ b/lib/cache/sfAPCCache.class.php @@ -69,6 +69,7 @@ public function has($key) * @see sfCache * * @param mixed|null $lifetime + * * @return bool|array */ public function set($key, $data, $lifetime = null) diff --git a/lib/cache/sfFileCache.class.php b/lib/cache/sfFileCache.class.php index 92c67a96a..0847c36c9 100644 --- a/lib/cache/sfFileCache.class.php +++ b/lib/cache/sfFileCache.class.php @@ -65,7 +65,7 @@ public function get($key, $default = null) $rawData = $data[self::READ_DATA]; - if ($rawData === 'FaLSe') { + if ('FaLSe' === $rawData) { $rawData = false; } @@ -93,7 +93,7 @@ public function set($key, $data, $lifetime = null) $this->clean(sfCache::OLD); } - if ($data === false) { + if (false === $data) { $data = 'FaLSe'; } diff --git a/lib/cache/sfSQLiteCache.class.php b/lib/cache/sfSQLiteCache.class.php index 954532528..957e7420f 100644 --- a/lib/cache/sfSQLiteCache.class.php +++ b/lib/cache/sfSQLiteCache.class.php @@ -72,7 +72,7 @@ public function get($key, $default = null) $data = $this->dbh->singleQuery(sprintf("SELECT data FROM cache WHERE key = '%s' AND timeout > %d", sqlite_escape_string($key), time())); } - if ($data === 'FaLSe') { + if ('FaLSe' === $data) { $data = false; } @@ -102,7 +102,7 @@ public function set($key, $data, $lifetime = null) $this->clean(sfCache::OLD); } - if ($data === false) { + if (false === $data) { $data = 'FaLSe'; } diff --git a/lib/validator/sfValidatorDate.class.php b/lib/validator/sfValidatorDate.class.php index ff98a140f..2fa355989 100644 --- a/lib/validator/sfValidatorDate.class.php +++ b/lib/validator/sfValidatorDate.class.php @@ -139,7 +139,7 @@ protected function doClean($value) $format = $this->getOption('with_time') ? $this->getOption('datetime_output') : $this->getOption('date_output'); - if ($format === 'U') { + if ('U' === $format) { return isset($date) ? (int) $date->format($format) : (int) date($format, $cleanTime); } diff --git a/lib/validator/sfValidatorError.class.php b/lib/validator/sfValidatorError.class.php index b60552c9d..9a25b7b1a 100644 --- a/lib/validator/sfValidatorError.class.php +++ b/lib/validator/sfValidatorError.class.php @@ -108,7 +108,7 @@ public function getArguments($raw = false) continue; } - $arguments["%{$key}%"] = $value !== null ? htmlspecialchars($value, ENT_QUOTES, sfValidatorBase::getCharset()) : ''; + $arguments["%{$key}%"] = null !== $value ? htmlspecialchars($value, ENT_QUOTES, sfValidatorBase::getCharset()) : ''; } return $arguments; diff --git a/lib/validator/sfValidatorString.class.php b/lib/validator/sfValidatorString.class.php index 2c0c80ab3..169bc4e3f 100644 --- a/lib/validator/sfValidatorString.class.php +++ b/lib/validator/sfValidatorString.class.php @@ -51,7 +51,7 @@ protected function configure($options = array(), $messages = array()) */ protected function doClean($value) { - if ($value === null) { + if (null === $value) { return $value; } diff --git a/lib/validator/sfValidatorTime.class.php b/lib/validator/sfValidatorTime.class.php index ad564feae..f98d3d568 100644 --- a/lib/validator/sfValidatorTime.class.php +++ b/lib/validator/sfValidatorTime.class.php @@ -74,7 +74,7 @@ protected function doClean($value) $formattedClean = date($this->getOption('time_output'), $clean); // don't change integer type - if ($this->getOption('time_output') === 'U') { + if ('U' === $this->getOption('time_output')) { settype($formattedClean, 'integer'); }