Skip to content

Commit 56e59f9

Browse files
committed
refactor!: remove guid type method
1 parent 33b681d commit 56e59f9

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file. This projec
1515
### Removed
1616

1717
- Package no longer supports PHP 8.1. The minimum supported version is now PHP 8.2.
18+
- **BREAKING**: Remove the `Guid::type()` method - use `enum_value($guid->type)` or `enum_string($guid->type)` instead.
1819

1920
## Unreleased
2021

src/Toolkit/Identifiers/Guid.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use UnitEnum;
2121

2222
use function CloudCreativity\Modules\Toolkit\enum_string;
23-
use function CloudCreativity\Modules\Toolkit\enum_value;
2423

2524
final readonly class Guid implements Identifier
2625
{
@@ -202,15 +201,4 @@ enum_string($this->type),
202201

203202
return $this;
204203
}
205-
206-
/**
207-
* Get the type expressed as a string or an integer.
208-
*
209-
* @return string|int
210-
*/
211-
public function type(): string|int
212-
{
213-
// TODO 4.0 use enum_string() instead
214-
return enum_value($this->type);
215-
}
216204
}

tests/Unit/Toolkit/Identifiers/GuidTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public function testStringId(UnitEnum|string $type, string $value, UnitEnum|stri
6363

6464
$this->assertInstanceOf(\Stringable::class, $guid);
6565
$this->assertSame($type, $guid->type);
66-
$this->assertSame($value, $guid->type());
6766
$this->assertObjectEquals(new StringId('123'), $guid->id);
6867
$this->assertSame($value . ':123', $guid->toString());
6968
$this->assertSame($value . ':123', (string) $guid);

0 commit comments

Comments
 (0)