Skip to content

Commit

Permalink
Merge pull request #9115 from BenMorel/getDefaultValueConstantName
Browse files Browse the repository at this point in the history
Infer getDefaultValueConstantName() type when isDefaultValueConstant() is true
  • Loading branch information
orklah committed Jan 15, 2023
2 parents f4b7ab9 + 951f082 commit dedb4bb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions stubs/Reflection.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,13 @@ class ReflectionParameter implements Reflector {
* @since 8.0
*/
public function isPromoted(): bool {}

/**
* @psalm-assert-if-true string $this->getDefaultValueConstantName()
*/
public function isDefaultValueConstant(): bool {}

public function getDefaultValueConstantName(): ?string {}
}

/** @psalm-immutable */
Expand Down

0 comments on commit dedb4bb

Please sign in to comment.