refactor: Don't check if ISnowflakeGenerator exists

This is a left over from the maps prototype

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
pull/56199/head
Carl Schwan 1 month ago
parent 5767361476
commit fd63a01d3d
No known key found for this signature in database
GPG Key ID: 02325448204E452A
  1. 5
      lib/private/AppFramework/ORM/EntityManager.php
  2. 1
      lib/private/Tags.php

@ -70,9 +70,8 @@ class EntityManager {
$primaryProperty = $property;
$generatorClass = $propertyAttributes->id->generatorClass;
if ($generatorClass) {
$generator = Server::get($generatorClass);
/** @psalm-suppress UndefinedClass NC 33 and above */
if (class_exists(ISnowflakeGenerator::class) && $generator instanceof ISnowflakeGenerator) {
if ($generatorClass === ISnowflakeGenerator::class) {
$generator = Server::get($generatorClass);
$isSnowflake = true;
/** @psalm-suppress UndefinedClass */
$values[$propertyAttributes->column->name] = $generator->nextId();

@ -165,7 +165,6 @@ class Tags implements ITags {
#[\Override]
public function getIdsForTag(int|string $tag): array|false {
$tagId = false;
if (is_numeric($tag)) {
$tagId = $tag;
} else {

Loading…
Cancel
Save