Skip to content

Commit

Permalink
fix: Adjust Entity types
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Sep 19, 2024
1 parent 87fb634 commit 3046e20
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/public/AppFramework/Db/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
/**
* @method int getId()
* @method void setId(int $id)
* @psalm-type AllowedTypes = 'json'|'blob'|'datetime'|'string'|'int'|'integer'|'bool'|'boolean'|'float'|'double'|'array'|'object'
* @since 7.0.0
* @psalm-consistent-constructor
*/
Expand All @@ -26,7 +25,7 @@ abstract class Entity {
public $id;

private array $_updatedFields = [];
/** @var array<string, AllowedTypes> */
/** @var array<string, \OCP\DB\Types::*> */
private array $_fieldTypes = ['id' => 'integer'];

/**
Expand Down Expand Up @@ -67,7 +66,7 @@ public static function fromRow(array $row): static {


/**
* @return array<string, AllowedTypes> with attribute and type
* @return array<string, \OCP\DB\Types::*> with attribute and type
* @since 7.0.0
*/
public function getFieldTypes(): array {
Expand Down Expand Up @@ -260,7 +259,7 @@ public function getUpdatedFields(): array {
* that value once its being returned from the database
*
* @param string $fieldName the name of the attribute
* @param AllowedTypes $type the type which will be used to match a cast
* @param \OCP\DB\Types::* $type the type which will be used to match a cast
* @since 7.0.0
*/
protected function addType(string $fieldName, string $type): void {
Expand Down

0 comments on commit 3046e20

Please sign in to comment.