/** * Handle the command * * @param $command * @return mixed */ public function handle($command) { $user = $this->userRepo->findById($command->userId); $this->userRepo->follow($command->userIdToFollow, $user); return $user; }
/** * Handle the command. * * @param object $command * @return void */ public function handle($command) { $user = $this->userRepo->findById($command->userId); $this->userRepo->unfollow($command->userIdToUnfollow, $user); }