Skip to content

Instantly share code, notes, and snippets.

@mariowhowrites
Created February 27, 2018 20:37
Show Gist options
  • Save mariowhowrites/5269065daa669b4c88a9324026d9dbf7 to your computer and use it in GitHub Desktop.
Save mariowhowrites/5269065daa669b4c88a9324026d9dbf7 to your computer and use it in GitHub Desktop.
public function handle(SavePriceSnapshot $event)
{
if ($this->validateMoonConditions($event)) {
$this->sendMoonAlert($event);
}
}
public function validateMoonConditions($event)
{
return (bool) ($this->hitsMooningPercentageTarget($event) && $this->hasNotRecentlyMooned($event) && $this->isActive($event));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment