Skip to content

Commit

Permalink
Use \OCB\DB\Types::STRING instead of 'string'
Browse files Browse the repository at this point in the history
  • Loading branch information
devnoname120 committed Mar 3, 2025
1 parent c03da5c commit 86eeccb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
16 changes: 8 additions & 8 deletions lib/Db/Bookmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use JsonSerializable;
use OCP\AppFramework\Db\Entity;

use OCP\DB\Types;
/**
* @method string getUserId()
* @method void setUserId(string $userId)
Expand Down Expand Up @@ -32,13 +32,13 @@ class Bookmark extends Entity implements JsonSerializable {
protected $lastModified;

public function __construct() {
$this->addType('userId', 'string');
$this->addType('fileId', 'integer');
$this->addType('type', 'string');
$this->addType('name', 'string');
$this->addType('value', 'string');
$this->addType('content', 'string');
$this->addType('lastModified', 'string');
$this->addType('userId', Types::STRING);
$this->addType('fileId', Types::INTEGER);
$this->addType('type', Types::STRING);
$this->addType('name', Types::STRING);
$this->addType('value', Types::STRING);
$this->addType('content', Types::STRING);
$this->addType('lastModified', Types::STRING);
}

public function jsonSerialize(): array {
Expand Down
13 changes: 7 additions & 6 deletions lib/Db/Preference.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use JsonSerializable;
use OCP\AppFramework\Db\Entity;
use OCP\DB\Types;

/**
* @method string getUserId()
Expand All @@ -29,12 +30,12 @@ class Preference extends Entity implements JsonSerializable {
protected $lastModified;

public function __construct() {
$this->addType('userId', 'string');
$this->addType('scope', 'string');
$this->addType('fileId', 'integer');
$this->addType('name', 'string');
$this->addType('value', 'string');
$this->addType('lastModified', 'string');
$this->addType('userId', Types::STRING);
$this->addType('scope', Types::STRING);
$this->addType('fileId', Types::INTEGER);
$this->addType('name', Types::STRING);
$this->addType('value', Types::STRING);
$this->addType('lastModified', Types::STRING);
}

public static function conditional_json_decode(string $el) {
Expand Down

0 comments on commit 86eeccb

Please sign in to comment.