Skip to content

Commit f362314

Browse files
committed
refactor: Don't check if ISnowflakeGenerator exists
This is a left over from the maps prototype Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent a2cdc02 commit f362314

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

lib/private/AppFramework/ORM/EntityManager.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@ public function insert(object $entity): object {
7070
$primaryProperty = $property;
7171
$generatorClass = $propertyAttributes->id->generatorClass;
7272
if ($generatorClass) {
73-
$generator = Server::get($generatorClass);
74-
/** @psalm-suppress UndefinedClass NC 33 and above */
75-
if (class_exists(ISnowflakeGenerator::class) && $generator instanceof ISnowflakeGenerator) {
73+
if ($generatorClass === ISnowflakeGenerator::class) {
74+
$generator = Server::get($generatorClass);
7675
$isSnowflake = true;
7776
/** @psalm-suppress UndefinedClass */
7877
$values[$propertyAttributes->column->name] = $generator->nextId();

lib/private/Tags.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ public function getTagsForObjects(array $objIds): array|false {
165165

166166
#[\Override]
167167
public function getIdsForTag(int|string $tag): array|false {
168-
$tagId = false;
169168
if (is_numeric($tag)) {
170169
$tagId = $tag;
171170
} else {

0 commit comments

Comments
 (0)