Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,6 @@ public static function option(self $some): self
return new self(new ApplicationShape(TypeConstructor::Option->value, [$some]));
}

public static function some(self $some): self
{
return $some;
}

public static function none(): self
{
return new self(new ApplicationShape(TypeConstructor::None->value));
Expand Down
25 changes: 0 additions & 25 deletions tests/unit/TypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,6 @@ public static function notEqualsCases(): iterable
}
}

/**
* @return iterable<string, array{Type | callable(): Type, Type | callable(): Type}>
*/
public static function equalsCases(): iterable
{
yield 'Some<T> == T' => [
static fn() => Type::some(Type::string()),
Type::string(),
];
}

/**
* @return iterable<string, array{Type, string}>
*/
Expand Down Expand Up @@ -713,20 +702,6 @@ public function testNotEquals(Type $a, Type $b): void
self::assertFalse($b->equals($a));
}

/**
* @param Type | callable(): Type $a
* @param Type | callable(): Type $b
*/
#[DataProvider('equalsCases')]
public function testEquals(Type|callable $a, Type|callable $b): void
{
$a = $a instanceof Type ? $a : $a();
$b = $b instanceof Type ? $b : $b();

self::assertTrue($a->equals($b));
self::assertTrue($b->equals($a));
}

#[DataProvider('toStringCases')]
public function testToString(Type $type, string $expected): void
{
Expand Down
Loading