19 lines
423 B
PHP
19 lines
423 B
PHP
|
<?php declare(strict_types=1);
|
||
|
|
||
|
namespace App\Repository;
|
||
|
|
||
|
use App\Entity\{Cpu, PreviouslyOwnedCpu};
|
||
|
|
||
|
class CpuRepository extends AcquireRepository {
|
||
|
public function deacquire(mixed $currentRecord): void
|
||
|
{
|
||
|
$currentRecord->setReceived(TRUE);
|
||
|
$this->moveRecord($currentRecord, new PreviouslyOwnedCpu());
|
||
|
}
|
||
|
|
||
|
public function reacquire(mixed $currentRecord): void
|
||
|
{
|
||
|
$this->moveRecord($currentRecord, new Cpu());
|
||
|
}
|
||
|
}
|