Merge pull request #3 from weirdan/method-signature

Method() signature
This commit is contained in:
Matthew Brown 2018-12-01 10:02:38 -05:00 committed by GitHub
commit 9db3b253bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 17 deletions

View File

@ -10,7 +10,7 @@ class Plugin implements PluginEntryPointInterface
/** @return void */ /** @return void */
public function __invoke(RegistrationInterface $psalm, SimpleXMLElement $config = null) public function __invoke(RegistrationInterface $psalm, SimpleXMLElement $config = null)
{ {
$psalm->addStubFile(__DIR__ . '/stubs/Assert.php'); $psalm->addStubFile(__DIR__ . '/stubs/Assert.php');
$psalm->addStubFile(__DIR__ . '/stubs/TestCase.php'); $psalm->addStubFile(__DIR__ . '/stubs/TestCase.php');
$psalm->addStubFile(__DIR__ . '/stubs/MockBuilder.php'); $psalm->addStubFile(__DIR__ . '/stubs/MockBuilder.php');
$psalm->addStubFile(__DIR__ . '/stubs/InvocationMocker.php'); $psalm->addStubFile(__DIR__ . '/stubs/InvocationMocker.php');

View File

@ -2,6 +2,7 @@
namespace PHPUnit\Framework\MockObject; namespace PHPUnit\Framework\MockObject;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\MockObject\Builder\InvocationMocker;
/** /**
* @template T * @template T
@ -46,24 +47,9 @@ interface MockObject
/** /**
* @param Constraint|string $constraint * @param Constraint|string $constraint
* *
* @return static * @return InvocationMocker
* *
* @throws RuntimeException * @throws RuntimeException
*/ */
public function method($constraint); public function method($constraint);
/**
* @param mixed $value
* @param mixed $nextValues, ...
*
* @return static
*/
public function willReturn($value, ...$nextValues);
/**
* @param Stub $stub
*
* @return InvocationMocker
*/
public function will(Stub $stub);
} }