Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

AT-4687 removing deprecated flag #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vendor
.idea
4 changes: 3 additions & 1 deletion src/Ndm/JsonRpc2/Client/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ public function call($method, $arguments = null)
throw $responseException;
}

assert('$response instanceof \\Ndm\\JsonRpc2\\Core\\Response');
if (!($response instanceof Core\Response)) {
throw new Exception\ClientResponseException(500, "invalid response object");
}

// if the response id doesn't match
if ($response->id !== $id) {
Expand Down
2 changes: 1 addition & 1 deletion src/Ndm/JsonRpc2/Client/Transport/HttpStreamTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class HttpStreamTransport implements TransportInterface, LoggerAwareInterface {
*/
public function __construct($url){
// check that the URL is valid
if (!filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)){
if (!filter_var($url, FILTER_VALIDATE_URL)){
throw new Exception\TransportException("The URL provided is not valid. Must be in the format (http[s]://domain[/path/][file])");
}
// check that they are using HTTP or HTTPS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class OAuthHttpStreamTransport implements TransportInterface, LoggerAwareInterfa
*/
public function __construct($url, OAuth\Consumer $consumer, OAuth\Token $token = null, $realm=""){
// check that the URL is valid
if (!filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)){
if (!filter_var($url, FILTER_VALIDATE_URL)){
throw new Exception\TransportException("The URL provided is not valid. Must be in the format (http[s]://domain[/path/][file])");
}
// check that they are using HTTP or HTTPS
Expand Down