Skip to content

Commit

Permalink
Fixed ObjectProphecyMethodReflection - parameters and return type are…
Browse files Browse the repository at this point in the history
… no longer part of MethodReflection
  • Loading branch information
ondrejmirtes committed Jul 26, 2018
1 parent 2639c8e commit 14e004a
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions src/Reflection/ObjectProphecyMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
namespace JanGregor\Prophecy\Reflection;

use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionVariant;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ClassMemberReflection;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Reflection\TrivialParametersAcceptor;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use Prophecy\Prophecy\MethodProphecy;

class ObjectProphecyMethodReflection implements MethodReflection
Expand Down Expand Up @@ -57,28 +55,14 @@ public function getName(): string
public function getVariants(): array
{
return [
new TrivialParametersAcceptor(),
new FunctionVariant(
[],
true,
new ObjectType(MethodProphecy::class)
),
];
}

/**
* @return ParameterReflection[]
*/
public function getParameters(): array
{
return [];
}

public function isVariadic(): bool
{
return true;
}

public function getReturnType(): Type
{
return new ObjectType(MethodProphecy::class);
}

public function getPrototype(): ClassMemberReflection
{
return $this;
Expand Down

0 comments on commit 14e004a

Please sign in to comment.