Skip to content

Instantly share code, notes, and snippets.

@JeroenDeDauw
Created August 21, 2018 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeroenDeDauw/5f096852b322233931bdd6bd2f180ffd to your computer and use it in GitHub Desktop.
Save JeroenDeDauw/5f096852b322233931bdd6bd2f180ffd to your computer and use it in GitHub Desktop.
<?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