Skip to content

Commit e8ba4aa

Browse files
committed
Add more phpdocs to make PHPStan happy
1 parent 4dd37c5 commit e8ba4aa

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

src/HtaccessClient.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ function (array $line) {
102102
);
103103
}
104104

105+
/**
106+
* @param array<string,mixed> $requestData
107+
* @return array<string,mixed>
108+
*/
105109
private function request(string $method, string $endpoint = '', array $requestData = []): array
106110
{
107111
$request = $this->requestFactory->createServerRequest(

src/HtaccessException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
class HtaccessException extends Exception
88
{
9+
/**
10+
* @param array<int,array{field: string, message: string}> $errors
11+
*/
912
public static function fromApiErrors(array $errors): self
1013
{
1114
$errorMessages = array_map(

src/ServerVariables.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
class ServerVariables
1010
{
11+
/**
12+
* @param array<string, string> $variables
13+
*/
1114
private function __construct(
1215
private array $variables
1316
) {
@@ -40,6 +43,9 @@ public function get(string $optionName): string
4043
return $this->variables[$optionName] ?? '';
4144
}
4245

46+
/**
47+
* @return array<string, string>
48+
*/
4349
public function toArray(): array
4450
{
4551
return $this->variables;

tests/ServerVariablesTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ public function it does not support variables using unsupported character
2020
ServerVariables::default()->with($serverVariableName, 'bar');
2121
}
2222

23+
/**
24+
* @return array<int, array<string>>
25+
*/
2326
public function providesInvalidServerVariableNames(): array
2427
{
2528
return [

0 commit comments

Comments
 (0)