Created
August 21, 2018 11:05
-
-
Save JeroenDeDauw/5f096852b322233931bdd6bd2f180ffd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Result { | |
// Static constructors | |
public function isRedirect(): bool { | |
} | |
public function getRedirectId(): int { | |
if ( !$this->isRedirect() ) { | |
throw new Pokeball(); | |
} | |
return $this->redirectId; | |
} | |
public function getEntityId(): int { | |
if ( $this->isNotFound() ) { | |
throw new Pokeball(); | |
} | |
return $this->entityId; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment