Skip to content

Commit

Permalink
Fix compatibility by removing type constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Mar 24, 2024
1 parent 5f7661b commit 77f4beb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/php/peer/http/HttpConnection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public function __construct($url, $transport= null) {
/**
* Set proxy
*
* @param peer.http.HttpProxy $proxy
* @param ?peer.http.HttpProxy $proxy
*/
public function setProxy(HttpProxy $proxy= null) {
public function setProxy($proxy= null) {
$this->transport->setProxy($proxy);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/php/peer/http/HttpRequest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class HttpRequest {
*
* @param peer.URL url object
*/
public function __construct(URL $url= null) {
public function __construct($url= null) {
if (null !== $url) $this->setUrl($url);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/php/peer/http/HttpTransport.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ abstract public function __construct(URL $url, $arg);
/**
* Set proxy
*
* @param peer.http.HttpProxy proxy
* @param ?peer.http.HttpProxy $proxy
*/
public function setProxy(HttpProxy $proxy= null) {
public function setProxy($proxy= null) {
$this->proxy= $proxy;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/php/peer/http/SocketHttpTransport.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ protected function newSocket(URL $url, $arg) {
/**
* Set proxy
*
* @param peer.http.HttpProxy proxy
* @param ?peer.http.HttpProxy proxy
*/
public function setProxy(HttpProxy $proxy= null) {
public function setProxy($proxy= null) {
parent::setProxy($proxy);
$this->proxySocket= $proxy ? new Socket($proxy->host(), $proxy->port()) : null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(\peer\URL $url, $arg) {
$this->arg= $arg;
}
public function setProxy(\peer\http\HttpProxy $proxy= null) {
public function setProxy($proxy= null) {
$this->proxy= $proxy;
}
Expand Down

0 comments on commit 77f4beb

Please sign in to comment.