Skip to content

Commit

Permalink
Merge pull request #7 from MethorZ/master
Browse files Browse the repository at this point in the history
Fixed missing nullable type hint
  • Loading branch information
maurice2k authored Mar 24, 2022
2 parents 872545b + 8877a64 commit 6ef9bc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vendor/
.idea
*.iml
composer.lock
6 changes: 3 additions & 3 deletions src/HttpChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class HttpChannel extends Channel
*
* @var HttpChannel
*/
protected static HttpChannel $prototype;
protected static ?HttpChannel $prototype = null;

/**
* Constructor
Expand Down Expand Up @@ -259,10 +259,10 @@ public static function prototype() : self
*
* @param string $url URL
* @param string $method HTTP Method (see self::METHOD_* consts)
* @param string|null $body Body (string or array)
* @param string|array null $body Body (string or array)
* @param string|null $contentType Content-Type
*/
public static function create(string $url, string $method = self::METHOD_GET, string $body = null, string $contentType = null): self
public static function create(string $url, string $method = self::METHOD_GET, $body = null, string $contentType = null): self
{
$httpChan = clone(self::prototype());
$httpChan->setURL($url);
Expand Down

0 comments on commit 6ef9bc6

Please sign in to comment.