tenantRepository()->findByUuid($uuid); } public function findTenantById(int $id): ?array { return $this->tenantRepository()->find($id); } public function existsDepartmentCode(string $code): bool { return $this->departmentRepository()->existsByCode($code); } public function existsDepartmentByTenantAndDescription(int $tenantId, string $description): bool { return $this->departmentRepository()->existsByTenantAndDescription($tenantId, $description); } /** * @param array $input * @return array */ public function createDepartmentFromAdmin(array $input, int $currentUserId): array { return $this->departmentService()->createFromAdmin($input, $currentUserId); } private function departmentRepository(): DepartmentRepositoryInterface { return $this->departmentRepository; } private function tenantRepository(): TenantRepositoryInterface { return $this->tenantRepository; } private function departmentService(): DepartmentService { return $this->departmentService; } }