Skip to content

Commit

Permalink
Rearrange the order of Source properties
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Nov 25, 2024
1 parent 3ed6f5c commit 36cdbca
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/Db/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ class Source extends Entity implements JsonSerializable
protected ?string $status = null;
protected ?int $logRetention = 3600; // seconds to save all logs
protected ?int $errorRetention = 86400; // seconds to save error logs
protected ?int $objectCount = null;
protected ?bool $test = null;
protected ?int $rateLimitLimit = null; // Indicates the total number of allowed requests within a specific time period.
protected ?int $rateLimitRemaining = null; // Specifies how many requests are still allowed within the current limit.
protected ?int $rateLimitReset = null; // A Unix Time Stamp that indicates when the rate limit will be reset.
protected ?int $rateLimitWindow = null; // Indicates how many seconds the client must wait before making new requests.
protected ?DateTime $lastCall = null;
protected ?DateTime $lastSync = null;
protected ?int $objectCount = null;
protected ?DateTime $dateCreated = null;
protected ?DateTime $dateModified = null;
protected ?bool $test = null;
protected ?int $rateLimitLimit = null;
protected ?int $rateLimitRemaining = null;
protected ?int $rateLimitReset = null;
protected ?int $rateLimitWindow = null;

public function __construct() {
$this->addType('uuid', 'string');
Expand Down Expand Up @@ -82,16 +82,16 @@ public function __construct() {
$this->addType('status', 'string');
$this->addType('logRetention', 'integer');
$this->addType('errorRetention', 'integer');
$this->addType('lastCall', 'datetime');
$this->addType('lastSync', 'datetime');
$this->addType('objectCount', 'integer');
$this->addType('dateCreated', 'datetime');
$this->addType('dateModified', 'datetime');
$this->addType('test', 'boolean');
$this->addType('rateLimitLimit', 'integer');
$this->addType('rateLimitRemaining', 'integer');
$this->addType('rateLimitReset', 'integer');
$this->addType('rateLimitWindow', 'integer');
$this->addType('lastCall', 'datetime');
$this->addType('lastSync', 'datetime');
$this->addType('dateCreated', 'datetime');
$this->addType('dateModified', 'datetime');
}

public function getJsonFields(): array
Expand Down Expand Up @@ -159,16 +159,16 @@ public function jsonSerialize(): array
'status' => $this->status,
'logRetention' => $this->logRetention,
'errorRetention' => $this->errorRetention,
'lastCall' => $this->lastCall,
'lastSync' => $this->lastSync,
'objectCount' => $this->objectCount,
'dateCreated' => isset($this->dateCreated) ? $this->dateCreated->format('c') : null,
'dateModified' => isset($this->dateModified) ? $this->dateModified->format('c') : null,
'test' => $this->test,
'rateLimitLimit' => $this->rateLimitLimit,
'rateLimitRemaining' => $this->rateLimitRemaining,
'rateLimitReset' => $this->rateLimitReset,
'rateLimitWindow' => $this->rateLimitWindow,
'lastCall' => $this->lastCall,
'lastSync' => $this->lastSync,
'dateCreated' => isset($this->dateCreated) ? $this->dateCreated->format('c') : null,
'dateModified' => isset($this->dateModified) ? $this->dateModified->format('c') : null,
];
}
}

0 comments on commit 36cdbca

Please sign in to comment.