Skip to content

Commit

Permalink
fix phpstan problems
Browse files Browse the repository at this point in the history
  • Loading branch information
jkavalik committed Oct 8, 2024
1 parent 2211b54 commit f987af7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tests/cases/integration/Entity/entity.compositePK.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class EntityCompositePKTest extends DataTestCase
$this->orm->clear();

$res = $this->orm->userStatsX->getBy(['date' => new DateTime('2019-01-01')]);
Assert::notNull($res);
Assert::same(100, $res->value);

$res->value = 200;
Expand All @@ -86,6 +87,7 @@ class EntityCompositePKTest extends DataTestCase
$this->orm->clear();

$res = $this->orm->userStatsX->getBy(['date' => new DateTime('2019-01-01')]);
Assert::notNull($res);
Assert::same(200, $res->value);

Environment::$checkAssertions = false;
Expand Down
2 changes: 1 addition & 1 deletion tests/cases/integration/Entity/entity.pk.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class EntityPkTest extends DataTestCase

$this->orm->clear();
$timeSeries = $this->orm->timeSeries->getById($datetime);
$timeSeries = $this->orm->timeSeries->getById($datetime);
Assert::notNull($timeSeries);
$timeSeries->value = 5;
$this->orm->persistAndFlush($timeSeries);

Expand Down
3 changes: 3 additions & 0 deletions tests/inc/model/userStatX/UserStatsXMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Nextras\Orm\Mapper\Dbal\DbalMapper;


/**
* @extends DbalMapper<UserStatX>
*/
final class UserStatsXMapper extends DbalMapper
{
}
3 changes: 3 additions & 0 deletions tests/inc/model/userStatX/UserStatsXRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Nextras\Orm\Repository\Repository;


/**
* @extends Repository<UserStatX>
*/
final class UserStatsXRepository extends Repository
{
static function getEntityClassNames(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ START TRANSACTION;
INSERT INTO "time_series" ("date", "value") VALUES ('2022-03-06 03:03:03.000000'::timestamptz, 3);
COMMIT;
SELECT "time_series".* FROM "time_series" AS "time_series" WHERE (("time_series"."date" = '2022-03-06 03:03:03.000000'::timestamptz));
SELECT "time_series".* FROM "time_series" AS "time_series" WHERE (("time_series"."date" = '2022-03-06 03:03:03.000000'::timestamptz));
START TRANSACTION;
UPDATE "time_series" SET "value" = 5 WHERE "date" = '2022-03-06 03:03:03.000000'::timestamptz;
COMMIT;
Expand Down

0 comments on commit f987af7

Please sign in to comment.