File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
lib/public/AppFramework/Db Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11<?php
22
3+ declare (strict_types=1 );
4+ /**
5+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
6+ * SPDX-License-Identifier: AGPL-3.0-only
7+ */
38namespace OCP \AppFramework \Db ;
49
510use OCP \AppFramework \Attribute \Consumable ;
@@ -19,6 +24,11 @@ abstract class SnowflakeAwareEntity extends Entity {
1924 /** @var array<string, \OCP\DB\Types::*> */
2025 private array $ _fieldTypes = ['id ' => 'string ' ];
2126
27+ /**
28+ * Automatically creates a snowflake ID
29+ *
30+ * @return void
31+ */
2232 #[\Override]
2333 public function setId (): void {
2434 if (empty ($ this ->id )) {
@@ -27,6 +37,9 @@ public function setId(): void {
2737 }
2838 }
2939
40+ /**
41+ * @psalm-suppress InvalidReturnStatement
42+ */
3043 #[\Override]
3144 public function getId (): string {
3245 return $ this ->id ;
You can’t perform that action at this time.
0 commit comments