Skip to content

Fix GH-9183 Get rid of unnecessary PHPDoc param and return type checks #9203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -917,10 +917,6 @@ public function getDefaultValueAsMethodSynopsisString(): ?string {

private function setTypes(?Type $type, ?Type $phpDocType): void
{
if ($phpDocType !== null && Type::equals($type, $phpDocType)) {
throw new Exception('PHPDoc param type "' . $phpDocType->__toString() . '" is unnecessary');
}

$this->type = $type;
$this->phpDocType = $phpDocType;
}
Expand Down Expand Up @@ -1166,10 +1162,6 @@ public function getMethodSynopsisType(): ?Type {

private function setTypes(?Type $type, ?Type $phpDocType, bool $tentativeReturnType): void
{
if ($phpDocType !== null && Type::equals($type, $phpDocType)) {
throw new Exception('PHPDoc return type "' . $phpDocType->__toString() . '" is unnecessary');
}

$this->type = $type;
$this->phpDocType = $phpDocType;
$this->tentativeReturnType = $tentativeReturnType;
Expand Down