Skip to content

Commit e84f059

Browse files
committed
Fixes "Logical operators should be avoided" errors.
1 parent c206b0d commit e84f059

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

tools/src/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static function getServers($config_file) {
7474
'upload_untracked' => array()
7575
), $options);
7676

77-
if (!isset($options['pass']) and ! isset($options['sftp_key'])) {
77+
if (!isset($options['pass']) && ! isset($options['sftp_key'])) {
7878
$options['pass'] = self::promptPassword();
7979
}
8080

tools/src/Ftp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected function recursive_remove($file_or_directory, $die_if_fail = false) {
129129
$filelist = ftp_nlist($this->connection, $file_or_directory);
130130

131131
foreach ($filelist as $file) {
132-
if ($file != '.' and $file != '..') {
132+
if ($file != '.' && $file != '..') {
133133
$this->recursive_remove($file);
134134
}
135135
}

tools/src/Server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function deploy(Git $git, $target_commit, $is_revert = false, $list_only
100100
$count_upload = count($changes['upload']);
101101
$count_delete = count($changes['delete']);
102102

103-
if ($count_upload == 0 and $count_delete == 0) {
103+
if ($count_upload == 0 && $count_delete == 0) {
104104
Helpers::logmessage("Nothing to update on: $this->host");
105105
return;
106106
}

tools/src/Sftp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function connect($test = false) {
1717

1818
if (isset($server['sftp_key'])) {
1919
$key = new \Crypt_RSA();
20-
if (isset($server['pass']) and ! empty($server['pass'])) {
20+
if (isset($server['pass']) && ! empty($server['pass'])) {
2121
$key->setPassword($server['pass']);
2222
}
2323
$key->loadKey(file_get_contents($server['sftp_key']));
@@ -113,7 +113,7 @@ protected function recursive_remove($file_or_directory, $if_dir = false) {
113113
if ($this->connection->delete($file_or_directory, $if_dir)) {
114114
$filelist = $this->connection->nlist($parent);
115115
foreach ($filelist as $file) {
116-
if ($file != '.' and $file != '..') {
116+
if ($file != '.' && $file != '..') {
117117
return false;
118118
}
119119
}

0 commit comments

Comments
 (0)