/**
* @return array<array-key, Error|null>
*/
public function getNotices(): array
{ return $this->
filterByErrorLevel(Error::LEVEL_NOTICE
);
} public function getPersistent(): self
{ return $this->
filter(fn (Error
$error) =>
$error->
isPersistent());
} /**
* @return array<array-key, Error|null>
*/
public function filterByErrorLevel(int
$errorLevel): array
{ return $this->
fmap(static fn (Error
$error): ?Error =>
$errorLevel ===
$error->
getLevel() ?
$error : null
);
} public function hasLevel(int
$errorLevel): bool
{