mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 11:54:32 +02:00
Use DatetimeImmutable instead of DateTime wherever possible
This commit is contained in:
parent
eebc373734
commit
235d572f8c
39 changed files with 222 additions and 112 deletions
|
@ -75,7 +75,7 @@ class APITokenFixtures extends Fixture implements DependentFixtureInterface
|
|||
$expired_token->setUser($admin_user);
|
||||
$expired_token->setLevel(ApiTokenLevel::FULL);
|
||||
$expired_token->setName('expired');
|
||||
$expired_token->setValidUntil(new \DateTime('-1 day'));
|
||||
$expired_token->setValidUntil(new \DateTimeImmutable('-1 day'));
|
||||
$this->setTokenSecret($expired_token, self::TOKEN_EXPIRED);
|
||||
$manager->persist($expired_token);
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ class PartFixtures extends Fixture implements DependentFixtureInterface
|
|||
$part->addPartLot($partLot1);
|
||||
|
||||
$partLot2 = new PartLot();
|
||||
$partLot2->setExpirationDate(new DateTime());
|
||||
$partLot2->setExpirationDate(new \DateTimeImmutable());
|
||||
$partLot2->setComment('Test');
|
||||
$partLot2->setNeedsRefill(true);
|
||||
$partLot2->setStorageLocation($manager->find(StorageLocation::class, 3));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue