Skip to content

Commit

Permalink
Optim : Boolean expression can be simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
s-renier-taonix-fr authored and f3l1x committed Feb 13, 2023
1 parent d4e82ee commit c73d742
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/nusoap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2874,7 +2874,7 @@ function decodeChunked($buffer, $lb)
// read chunk-size, chunk-extension (if any) and CRLF
// get the position of the linebreak
$chunkend = strpos($buffer, $lb);
if ($chunkend == false) {
if (!$chunkend) {
$this->debug('no linebreak found in decodeChunked');
return $new;
}
Expand All @@ -2887,7 +2887,7 @@ function decodeChunked($buffer, $lb)
$chunkend = strpos($buffer, $lb, $chunkstart + $chunk_size);

// Just in case we got a broken connection
if ($chunkend == false) {
if (!$chunkend) {
$chunk = substr($buffer, $chunkstart);
// append chunk-data to entity-body
$new .= $chunk;
Expand All @@ -2905,7 +2905,7 @@ function decodeChunked($buffer, $lb)
$chunkstart = $chunkend + strlen($lb);

$chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb);
if ($chunkend == false) {
if (!$chunkend) {
break; //Just in case we got a broken connection
}
$temp = substr($buffer, $chunkstart, $chunkend - $chunkstart);
Expand Down Expand Up @@ -4596,9 +4596,9 @@ function register($name, $in = array(), $out = array(), $namespace = false, $soa
if (!is_array($out)) {
die('You must provide an array for operation outputs');
}
if (false == $namespace) {
if (!$namespace) {
}
if (false == $soapaction) {
if (!$soapaction) {
if (isset($_SERVER)) {
$SERVER_NAME = $_SERVER['SERVER_NAME'];
$SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
Expand All @@ -4617,10 +4617,10 @@ function register($name, $in = array(), $out = array(), $namespace = false, $soa
}
$soapaction = "$SCHEME://$SERVER_NAME$SCRIPT_NAME/$name";
}
if (false == $style) {
if (!$style) {
$style = "rpc";
}
if (false == $use) {
if (!$use) {
$use = "encoded";
}
if ($use == 'encoded' && $encodingStyle == '') {
Expand Down Expand Up @@ -4702,11 +4702,11 @@ function configureWSDL($serviceName, $namespace = false, $endpoint = false, $sty
} else {
$SERVER_PORT = ':' . $SERVER_PORT;
}
if (false == $namespace) {
if (!$namespace) {
$namespace = "http://$SERVER_NAME/soap/$serviceName";
}

if (false == $endpoint) {
if (!$endpoint) {
if ($HTTPS == '1' || $HTTPS == 'on') {
$SCHEME = 'https';
} else {
Expand All @@ -4715,7 +4715,7 @@ function configureWSDL($serviceName, $namespace = false, $endpoint = false, $sty
$endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME";
}

if (false == $schemaTargetNamespace) {
if (!$schemaTargetNamespace) {
$schemaTargetNamespace = $namespace;
}

Expand Down Expand Up @@ -7886,7 +7886,7 @@ function send($msg, $soapaction = '', $timeout = 0, $response_timeout = 30)
// http(s)
case preg_match('/^http/', $this->endpoint):
$this->debug('transporting via HTTP');
if ($this->persistentConnection == true && is_object($this->persistentConnection)) {
if ($this->persistentConnection && is_object($this->persistentConnection)) {
$http =& $this->persistentConnection;
} else {
$http = new soap_transport_http($this->endpoint, $this->curl_options, $this->use_curl);
Expand Down

0 comments on commit c73d742

Please sign in to comment.