Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Use type declaration #828

Merged
merged 1 commit into from
Dec 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions classes/Domain/Speaker/SpeakerRepository.php
Expand Up @@ -21,13 +21,13 @@ interface SpeakerRepository
/**
* Retrieves a speaker with associated talks.
*
* @param string $speakerId
* @param int $speakerId
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using int everywhere as identifiers.

*
* @throws EntityNotFoundException
*
* @return User the speaker that matches given identifier
*/
public function findById($speakerId): User;
public function findById(int $speakerId): User;

/**
* Saves a speaker and their talks.
Expand Down
Expand Up @@ -30,7 +30,7 @@ public function __construct(User $userModel)
$this->userModel = $userModel;
}

public function findById($speakerId): User
public function findById(int $speakerId): User
{
try {
$speaker = $this->userModel->findOrFail($speakerId);
Expand Down