Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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