Skip to content

Commit

Permalink
Extract headers and pass them into CheckData.php
Browse files Browse the repository at this point in the history
  • Loading branch information
leMaur committed Mar 24, 2024
1 parent 8ff3326 commit fce7ac8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/DataTransferObject/CheckData.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ final class CheckData
public function __construct(

Check failure on line 9 in src/DataTransferObject/CheckData.php

View workflow job for this annotation

GitHub Actions / phpstan

Method Lemaur\UrlChecker\DataTransferObject\CheckData::__construct() has parameter $headers with no value type specified in iterable type array.
public int $statusCode,
public string $reasonPhrase,
public array $headers = [],
) {
}
}
1 change: 1 addition & 0 deletions src/UrlChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public static function check(string $url, ?string $userAgent = null): CheckData
return new CheckData(
statusCode: $response->getStatusCode(),
reasonPhrase: $response->getReasonPhrase(),
headers: $response->getHeaders(),
);
} catch (GuzzleException $guzzleException) {
return new CheckData(
Expand Down

0 comments on commit fce7ac8

Please sign in to comment.