Skip to content

Commit 74af81e

Browse files
authored
Improve phpdoc annotations (#81)
1 parent b2f78fc commit 74af81e

4 files changed

Lines changed: 7 additions & 15 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"phpunit/phpunit": "^9.4",
2525
"roave/infection-static-analysis-plugin": "^1.5",
2626
"spatie/phpunit-watcher": "^1.23",
27-
"vimeo/psalm": "^4.9"
27+
"vimeo/psalm": "^4.10"
2828
},
2929
"autoload": {
3030
"psr-4": {

src/Paginator/KeysetPaginator.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ public function read(): iterable
130130
}
131131

132132
/**
133-
* @return $this
134-
*
135133
* @psalm-mutation-free
136134
*/
137135
public function withPreviousPageToken(?string $token): self
@@ -143,8 +141,6 @@ public function withPreviousPageToken(?string $token): self
143141
}
144142

145143
/**
146-
* @return $this
147-
*
148144
* @psalm-mutation-free
149145
*/
150146
public function withNextPageToken(?string $token): self
@@ -172,8 +168,6 @@ public function getNextPageToken(): ?string
172168
}
173169

174170
/**
175-
* @return $this
176-
*
177171
* @psalm-mutation-free
178172
*/
179173
public function withPageSize(int $pageSize): self

src/Paginator/OffsetPaginator.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ public function getCurrentPage(): int
7373
}
7474

7575
/**
76-
* @return $this
77-
*
7876
* @psalm-mutation-free
7977
*/
8078
public function withCurrentPage(int $page): self
@@ -89,7 +87,7 @@ public function withCurrentPage(int $page): self
8987
}
9088

9189
/**
92-
* @return $this
90+
* @return self
9391
*
9492
* @psalm-mutation-free
9593
*/
@@ -154,7 +152,7 @@ public function getPreviousPageToken(): ?string
154152
}
155153

156154
/**
157-
* @return $this
155+
* @return self
158156
*
159157
* @psalm-mutation-free
160158
*/
@@ -164,7 +162,7 @@ public function withNextPageToken(?string $token): self
164162
}
165163

166164
/**
167-
* @return $this
165+
* @return self
168166
*
169167
* @psalm-mutation-free
170168
*/

src/Paginator/PaginatorInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ public function getNextPageToken(): ?string;
3333
public function getPreviousPageToken(): ?string;
3434

3535
/**
36-
* @return $this
36+
* @return static
3737
*
3838
* @psalm-mutation-free
3939
*/
4040
public function withNextPageToken(?string $token): self;
4141

4242
/**
43-
* @return $this
43+
* @return static
4444
*
4545
* @psalm-mutation-free
4646
*/
4747
public function withPreviousPageToken(?string $token): self;
4848

4949
/**
50-
* @return $this
50+
* @return static
5151
*
5252
* @psalm-mutation-free
5353
*/

0 commit comments

Comments
 (0)