Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#7412 from samsonasik/n…
Browse files Browse the repository at this point in the history
…ull-three

Use === and !== in null checks instead of == and !=
  • Loading branch information
weierophinney committed May 4, 2015
3 parents 5c658c9 + dd5bd4a + 9764ccf commit ef1f90b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Protocol/Imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ public function store(array $flags, $from, $to = null, $mode = null, $silent = t

$flags = $this->escapeList($flags);
$set = (int) $from;
if ($to != null) {
if ($to !== null) {
$set .= ':' . ($to == INF ? '*' : (int) $to);
}

Expand Down Expand Up @@ -710,7 +710,7 @@ public function append($folder, $message, $flags = null, $date = null)
public function copy($folder, $from, $to = null)
{
$set = (int) $from;
if ($to != null) {
if ($to !== null) {
$set .= ':' . ($to == INF ? '*' : (int) $to);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Protocol/Smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function __construct($host = '127.0.0.1', $port = null, array $config = n
case 'ssl':
$this->transport = 'ssl';
$this->secure = 'ssl';
if ($port == null) {
if ($port === null) {
$port = 465;
}
break;
Expand All @@ -128,7 +128,7 @@ public function __construct($host = '127.0.0.1', $port = null, array $config = n
}

// If no port has been specified then check the master PHP ini file. Defaults to 25 if the ini setting is null.
if ($port == null) {
if ($port === null) {
if (($port = ini_get('smtp_port')) == '') {
$port = 25;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public function createFolder($name, $parentFolder = null)
// TODO: we assume / as the hierarchy delim - need to get that from the folder class!
if ($parentFolder instanceof Folder) {
$folder = $parentFolder->getGlobalName() . '/' . $name;
} elseif ($parentFolder != null) {
} elseif ($parentFolder !== null) {
$folder = $parentFolder . '/' . $name;
} else {
$folder = $name;
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Writable/Maildir.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function createFolder($name, $parentFolder = null)
{
if ($parentFolder instanceof Folder) {
$folder = $parentFolder->getGlobalName() . $this->delim . $name;
} elseif ($parentFolder != null) {
} elseif ($parentFolder !== null) {
$folder = rtrim($parentFolder, $this->delim) . $this->delim . $name;
} else {
$folder = $name;
Expand Down

0 comments on commit ef1f90b

Please sign in to comment.