Skip to content

Commit

Permalink
Merge pull request #208 from phil-davis/apply-cs-fixer-20230626
Browse files Browse the repository at this point in the history
Apply cs-fixer and phpstan changes to make CI pass
  • Loading branch information
phil-davis authored Jun 26, 2023
2 parents cea804b + 7c4062e commit c2cd0a5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions lib/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,6 @@ public function setThrowExceptions(bool $throwExceptions): void
* Adds a CURL setting.
*
* These settings will be included in every HTTP request.
*
* @param mixed $value
*/
public function addCurlSetting(int $name, $value): void
{
Expand Down Expand Up @@ -340,7 +338,7 @@ protected function doRequest(RequestInterface $request): ResponseInterface
*
* @var resource|null
*/
private $curlHandle = null;
private $curlHandle;

/**
* Handler for curl_multi requests.
Expand All @@ -349,7 +347,7 @@ protected function doRequest(RequestInterface $request): ResponseInterface
*
* @var resource|null
*/
private $curlMultiHandle = null;
private $curlMultiHandle;

/**
* Has a list of curl handles, as well as their associated success and
Expand Down
2 changes: 1 addition & 1 deletion lib/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract class Message implements MessageInterface
*
* @var resource|string|callable|null
*/
protected $body = null;
protected $body;

/**
* Contains the list of HTTP headers.
Expand Down
2 changes: 1 addition & 1 deletion lib/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Response extends Message implements ResponseInterface
* @param array<string, mixed>|null $headers
* @param resource|string|callable|null $body
*/
public function __construct($status = 500, ?array $headers = null, $body = null)
public function __construct($status = 500, array $headers = null, $body = null)
{
if (null !== $status) {
$this->setStatus($status);
Expand Down
6 changes: 3 additions & 3 deletions lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ function negotiateContentType(?string $acceptHeaderValue, array $availableOption

// Does this entry win?
if (
($proposal['quality'] > $lastQuality) ||
($proposal['quality'] === $lastQuality && $specificity > $lastSpecificity) ||
($proposal['quality'] === $lastQuality && $specificity === $lastSpecificity && $optionIndex < $lastOptionIndex)
($proposal['quality'] > $lastQuality)
|| ($proposal['quality'] === $lastQuality && $specificity > $lastSpecificity)
|| ($proposal['quality'] === $lastQuality && $specificity === $lastSpecificity && $optionIndex < $lastOptionIndex)
) {
$lastQuality = $proposal['quality'];
$lastSpecificity = $specificity;
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:
path: lib/Client.php
-
message: "#^Left side of || is always false.$#"
count: 1
count: 2
path: lib/Client.php
-
message: "#^Strict comparison using === between null and array<string, mixed> will always evaluate to false.$#"
Expand Down

0 comments on commit c2cd0a5

Please sign in to comment.