Skip to content

Commit

Permalink
Fix the remaining string comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Sep 27, 2015
1 parent 1e505b8 commit f3c29d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Controller.php
Expand Up @@ -331,7 +331,7 @@ public function loadComponent($name, array $config = [])
public function __get($name)
{
if (in_array($name, ['layout', 'view', 'theme', 'autoLayout', 'viewPath', 'layoutPath'], true)) {
$method = $name == 'viewPath' ? 'templatePath' : $name;
$method = $name === 'viewPath' ? 'templatePath' : $name;
trigger_error(
sprintf('Controller::$%s is deprecated. Use $this->viewBuilder()->%s() instead.', $name, $method),
E_USER_DEPRECATED
Expand Down
6 changes: 3 additions & 3 deletions src/Mailer/Transport/SmtpTransport.php
Expand Up @@ -247,8 +247,8 @@ protected function _connect()
protected function _auth()
{
if (isset($this->_config['username']) && isset($this->_config['password'])) {
$replyCode = $this->_smtpSend('AUTH LOGIN', '334|500|502|504');
if ($replyCode == '334') {
$replyCode = (string)$this->_smtpSend('AUTH LOGIN', '334|500|502|504');
if ($replyCode === '334') {
try {
$this->_smtpSend(base64_encode($this->_config['username']), '334');
} catch (SocketException $e) {
Expand All @@ -259,7 +259,7 @@ protected function _auth()
} catch (SocketException $e) {
throw new SocketException('SMTP server did not accept the password.');
}
} elseif ($replyCode == '504') {
} elseif ($replyCode === '504') {
throw new SocketException('SMTP authentication method not allowed, check if SMTP server requires TLS.');
} else {
throw new SocketException('AUTH command not recognized or not implemented, SMTP server may not require authentication.');
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/Router.php
Expand Up @@ -445,7 +445,7 @@ public static function reload()
return;
}
foreach (static::$_initialState as $key => $val) {
if ($key != '_initialState') {
if ($key !== '_initialState') {
static::${$key} = $val;
}
}
Expand Down

0 comments on commit f3c29d5

Please sign in to comment.