Skip to content

Commit

Permalink
qa: remove unnecessary lines from tests
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
  • Loading branch information
boesing committed Sep 10, 2023
1 parent e3920e6 commit 56b719b
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions tests/AssertAnnotationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2890,9 +2890,6 @@ public static function doAssert($value): void
/** @template InstanceType */
interface PluginManagerInterface
{
/** @return InstanceType */
public function get(): mixed;
/** @psalm-assert InstanceType $value */
public function validate(mixed $value): void;
}
Expand All @@ -2903,15 +2900,6 @@ public function validate(mixed $value): void;
*/
abstract class AbstractPluginManager implements PluginManagerInterface
{
/** @param InstanceType $value */
public function __construct(private readonly mixed $value)
{}
/** {@inheritDoc} */
public function get(): mixed
{
return $this->value;
}
}
/**
Expand All @@ -2920,21 +2908,6 @@ public function get(): mixed
*/
abstract class AbstractSingleInstancePluginManager extends AbstractPluginManager
{
/**
* An object type that the created instance must be instanced of
*
* @var class-string<InstanceType>
*/
protected string $instanceOf;
/** {@inheritDoc} */
public function get(): object
{
return parent::get();
}
/** {@inheritDoc} */
public function validate(mixed $value): void
{
}
Expand All @@ -2949,8 +2922,6 @@ public function validate(mixed $value): void
/** @template-extends AbstractSingleInstancePluginManager<stdClass> */
final class Qoo extends AbstractSingleInstancePluginManager
{
/** @var class-string<stdClass> */
protected string $instanceOf = stdClass::class;
}
/** @template-extends AbstractPluginManager<callable> */
Expand All @@ -2963,13 +2934,13 @@ public function validate(mixed $value): void
}
namespace {
$baz = new \Namespace2\Qoo(new stdClass);
$baz = new \Namespace2\Qoo();
/** @var mixed $object */
$object = null;
$baz->validate($object);
$ooq = new \Namespace2\Ooq(function (): void {});
$ooq = new \Namespace2\Ooq();
/** @var mixed $callable */
$callable = null;
$ooq->validate($callable);
Expand Down

0 comments on commit 56b719b

Please sign in to comment.