Skip to content

Commit

Permalink
Closes #3871
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 4, 2020
1 parent 8b5b439 commit a5b2c52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
4 changes: 4 additions & 0 deletions ChangeLog-10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes of the PHPUnit 10.0 release series are documented in this fi

## [10.0.0] - 2021-02-05

### Changed

* [#3871](https://github.com/sebastianbergmann/phpunit/issues/3871): Declare return types for `InvocationStubber` methods

### Removed

* [#3870](https://github.com/sebastianbergmann/phpunit/issues/3870): Drop support for PHP 7.3
Expand Down
29 changes: 8 additions & 21 deletions src/Framework/MockObject/Builder/InvocationStubber.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,34 @@ interface InvocationStubber
{
public function will(Stub $stub): Identity;

/** @return self */
public function willReturn($value, ...$nextValues)/*: self */;
public function willReturn($value, ...$nextValues): self;

/**
* @param mixed $reference
*
* @return self
*/
public function willReturnReference(&$reference)/*: self */;
public function willReturnReference(&$reference): self;

/**
* @param array<int, array<int, mixed>> $valueMap
*
* @return self
*/
public function willReturnMap(array $valueMap)/*: self */;
public function willReturnMap(array $valueMap): self;

/**
* @param int $argumentIndex
*
* @return self
*/
public function willReturnArgument($argumentIndex)/*: self */;
public function willReturnArgument($argumentIndex): self;

/**
* @param callable $callback
*
* @return self
*/
public function willReturnCallback($callback)/*: self */;
public function willReturnCallback($callback): self;

/** @return self */
public function willReturnSelf()/*: self */;
public function willReturnSelf(): self;

/**
* @param mixed $values
*
* @return self
*/
public function willReturnOnConsecutiveCalls(...$values)/*: self */;
public function willReturnOnConsecutiveCalls(...$values): self;

/** @return self */
public function willThrowException(Throwable $exception)/*: self */;
public function willThrowException(Throwable $exception): self;
}

0 comments on commit a5b2c52

Please sign in to comment.