for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace App\Service\Note;
final class Find extends Base
{
/**
* @return array<string>
*/
public function getAll(): array
return $this->noteRepository->getAllNotes();
}
public function getNotesByPage(
int $page,
int $perPage,
?string $name,
?string $description
): array {
if ($page < 1) {
$page = 1;
if ($perPage < 1) {
$perPage = self::DEFAULT_PER_PAGE_PAGINATION;
return $this->noteRepository->getNotesByPage(
return $this->noteReposi...e, $name, $description)
array<string,array|array<string,double|integer>>
string[]
$page,
$perPage,
$name,
$description
);
public function getOne(int $noteId): object
if (self::isRedisEnabled() === true) {
$note = $this->getOneFromCache($noteId);
} else {
$note = $this->getOneFromDb($noteId)->toJson();
return $note;
public function search(string $notesName): array
return $this->noteRepository->search($notesName);