From dfa9f715425fb05869abda66ddde553a74be5951 Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Sat, 1 Dec 2018 04:41:48 +0200 Subject: [PATCH 1/2] tabs to spaces (as declared by phpcs rules) --- Plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin.php b/Plugin.php index 9f8b3cf..0550a8f 100755 --- a/Plugin.php +++ b/Plugin.php @@ -10,7 +10,7 @@ class Plugin implements PluginEntryPointInterface /** @return void */ 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/MockBuilder.php'); $psalm->addStubFile(__DIR__ . '/stubs/InvocationMocker.php'); From 4605575b4dc0130315dd699a28f6898bd6fea7f3 Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Sat, 1 Dec 2018 04:50:53 +0200 Subject: [PATCH 2/2] method() returns InvocationMocker and dropped methods that are not actually present on MockObject --- stubs/MockBuilder.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/stubs/MockBuilder.php b/stubs/MockBuilder.php index 68fd24b..2ffcde3 100644 --- a/stubs/MockBuilder.php +++ b/stubs/MockBuilder.php @@ -2,6 +2,7 @@ namespace PHPUnit\Framework\MockObject; use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\MockObject\Builder\InvocationMocker; /** * @template T @@ -46,24 +47,9 @@ interface MockObject /** * @param Constraint|string $constraint * - * @return static + * @return InvocationMocker * * @throws RuntimeException */ 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); }