implement getAll in fake text repo

This commit is contained in:
Yisroel Baum 2026-04-12 22:05:53 +03:00
parent 21076f10e8
commit 0853aacdfb
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -47,4 +47,20 @@ class FakeTextRepository implements TextRepository
{
return count($this->existingTexts);
}
/**
* @return Text[]
*/
public function getAll(): array
{
return array_map(
function (Text $text) {
return new Text(
id: $text->getId(),
name: $text->getName(),
);
},
$this->existingTexts
);
}
}