Skip to content

Commit

Permalink
fix type mixing
Browse files Browse the repository at this point in the history
  • Loading branch information
jturbide committed Feb 24, 2024
1 parent d03f615 commit 32b6164
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Mvc/Model/Replication.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use Phalcon\Config\ConfigInterface;
use Phalcon\Db\Adapter\AdapterInterface;
use Zemit\Mvc\Model\AbstractTrait\AbstractEventsManager;
use Zemit\Mvc\Model\AbstractTrait\AbstractInjectable;

/**
Expand All @@ -25,7 +26,10 @@ trait Replication
abstract public function setConnectionService(string $connectionService): void;
abstract public function setReadConnectionService(string $connectionService): void;
abstract public function setWriteConnectionService(string $connectionService): void;
abstract public function getWriteConnectionService(): string;
abstract public function getReadConnectionService(): string;

use AbstractEventsManager;
use AbstractInjectable;
use Options;

Expand Down Expand Up @@ -123,7 +127,7 @@ public function selectReadConnection(): AdapterInterface
public function addReadWriteConnectionBehavior(): void
{
$forceMasterConnectionService = function () {
self::setReplicationReadyAt(round(microtime(true) * 1000) + self::getReplicationLag());
self::setReplicationReadyAt(round(microtime(true) * 1000) + (float)self::getReplicationLag());
};

// @todo change to behavior or check if this is added multiple times
Expand Down

0 comments on commit 32b6164

Please sign in to comment.