Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/Jira/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
$this->setEndPoint($endpoint);
$this->authentication = $authentication;

if ( is_null($client) ) {
if ( $client === null ) {
$client = new CurlClient();
}

Expand Down Expand Up @@ -689,7 +689,7 @@
'object' => $object,
);

if ( !is_null($application) ) {
if ( $application !== null ) {

Check warning on line 692 in src/Jira/Api.php

View check run for this annotation

Codecov / codecov/patch

src/Jira/Api.php#L692

Added line #L692 was not covered by tests
$options['application'] = $application;
}

Expand Down Expand Up @@ -744,13 +744,11 @@
if ( $return_as_array ) {
return $json;
}
else {
return new Result($json);
}
}
else {
return false;

return new Result($json);
}

return false;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Jira/Api/Client/CurlClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
namespace chobie\Jira\Api\Client;


use chobie\Jira\Api\Authentication\Anonymous;
use chobie\Jira\Api\Authentication\AuthenticationInterface;
use chobie\Jira\Api\Authentication\Basic;
use chobie\Jira\Api\Authentication\Anonymous;
use chobie\Jira\Api\Exception;
use chobie\Jira\Api\UnauthorizedException;

Expand Down Expand Up @@ -146,7 +146,7 @@ public function sendRequest(
}

// @codeCoverageIgnoreStart
if ( is_null($response) ) {
if ( $response === null ) {
throw new Exception('JIRA Rest server returns unexpected result.');
}
// @codeCoverageIgnoreEnd
Expand Down
2 changes: 1 addition & 1 deletion src/Jira/Api/Client/PHPClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function sendRequest(
}

// @codeCoverageIgnoreStart
if ( is_null($response) ) {
if ( $response === null ) {
throw new Exception('JIRA Rest server returns unexpected result.');
}
// @codeCoverageIgnoreEnd
Expand Down
17 changes: 7 additions & 10 deletions src/Jira/Issues/Walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,8 @@ public function current()

return $callback($tmp);
}
else {
return $this->issues[$this->offset];
}

return $this->issues[$this->offset];
}

/**
Expand All @@ -184,9 +183,8 @@ public function key()
if ( $this->startAt > 0 ) {
return $this->offset + (($this->startAt - 1) * $this->perPage);
}
else {
return 0;
}

return 0;
}

/**
Expand All @@ -200,7 +198,7 @@ public function key()
*/
public function valid()
{
if ( is_null($this->jql) ) {
if ( $this->jql === null ) {
throw new \Exception('you have to call Jira_Walker::push($jql, $fields) at first');
}

Expand Down Expand Up @@ -247,9 +245,8 @@ public function valid()
if ( ($this->startAt - 1) * $this->perPage + $this->offset < $this->total ) {
return true;
}
else {
return false;
}

return false;
}
}
}
Expand Down
Loading