Skip to content
Permalink
Browse files

Fix the remaining string comparisons

  • Loading branch information...
dereuromark committed Sep 27, 2015
1 parent 1e505b8 commit f3c29d5833a1b7ac5fb7801cf24e49fac36b5575
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/Controller/Controller.php
  2. +3 −3 src/Mailer/Transport/SmtpTransport.php
  3. +1 −1 src/Routing/Router.php
@@ -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
@@ -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) {
@@ -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.');
@@ -445,7 +445,7 @@ public static function reload()
return;
}
foreach (static::$_initialState as $key => $val) {
if ($key != '_initialState') {
if ($key !== '_initialState') {
static::${$key} = $val;
}
}

0 comments on commit f3c29d5

Please sign in to comment.
You can’t perform that action at this time.