Skip to content

Commit 98b858e

Browse files
authored
Fix GH-9183 Get rid of unnecessary PHPDoc param and return type checks (#9203)
1 parent 5aca25a commit 98b858e

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

build/gen_stub.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -917,10 +917,6 @@ public function getDefaultValueAsMethodSynopsisString(): ?string {
917917

918918
private function setTypes(?Type $type, ?Type $phpDocType): void
919919
{
920-
if ($phpDocType !== null && Type::equals($type, $phpDocType)) {
921-
throw new Exception('PHPDoc param type "' . $phpDocType->__toString() . '" is unnecessary');
922-
}
923-
924920
$this->type = $type;
925921
$this->phpDocType = $phpDocType;
926922
}
@@ -1166,10 +1162,6 @@ public function getMethodSynopsisType(): ?Type {
11661162

11671163
private function setTypes(?Type $type, ?Type $phpDocType, bool $tentativeReturnType): void
11681164
{
1169-
if ($phpDocType !== null && Type::equals($type, $phpDocType)) {
1170-
throw new Exception('PHPDoc return type "' . $phpDocType->__toString() . '" is unnecessary');
1171-
}
1172-
11731165
$this->type = $type;
11741166
$this->phpDocType = $phpDocType;
11751167
$this->tentativeReturnType = $tentativeReturnType;

0 commit comments

Comments
 (0)