Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jturbide committed Feb 29, 2024
1 parent 4cb8c98 commit 6aac466
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Mvc/Model/LifeCycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Zemit\Mvc\Model;

use Phalcon\Di\Di;
use Phalcon\Mvc\Model\ManagerInterface;
use Phalcon\Mvc\Model\Query\BuilderInterface;
use Phalcon\Mvc\Model\QueryInterface;
use Phalcon\Mvc\Model\ResultsetInterface;
Expand All @@ -25,7 +24,7 @@ trait LifeCycle
/**
* Return the query for data retention
*/
public static function prepareLifeCycleQuery(BuilderInterface $builder = null, ?array $parameters = null): void
public static function prepareLifeCycleQuery(BuilderInterface $builder, ?array $parameters = null): void
{
// data life cycle policy must be defined
if (empty($parameters)) {
Expand Down Expand Up @@ -68,7 +67,7 @@ public static function getBuilder(?array $parameters = null): BuilderInterface
{
$di = Di::getDefault();
$modelsManager = $di->getShared('modelsManager');
assert($modelsManager instanceof ManagerInterface);
assert($modelsManager instanceof \Phalcon\Mvc\Model\ManagerInterface);

$builder = $modelsManager->createBuilder($parameters);
$builder->from(get_called_class());
Expand Down

0 comments on commit 6aac466

Please sign in to comment.