for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace App\Service\User;
final class Find extends Base
{
/**
* @return array<string>
*/
public function getAll(): array
return $this->userRepository->getAllUsers();
}
public function getUsersByPage(
int $page,
int $perPage,
?string $name,
?string $email
): array {
if ($page < 1) {
$page = 1;
if ($perPage < 1) {
$perPage = self::DEFAULT_PER_PAGE_PAGINATION;
return $this->userRepository->getUsersByPage(
return $this->userReposi...perPage, $name, $email)
array<string,array|array<string,double|integer>>
string[]
$page,
$perPage,
$name,
$email
);
public function getOne(int $userId): object
if (self::isRedisEnabled() === true) {
$user = $this->getUserFromCache($userId);
} else {
$user = $this->getUserFromDb($userId)->toJson();
return $user;
public function search(string $usersName): array
return $this->userRepository->search($usersName);