Skip to content

Commit

Permalink
Docblocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseleite committed Jan 8, 2019
1 parent e9b4e72 commit a07f63b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions addons/Spock/Commander.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,21 @@ public function shouldRunCommands()
return $this->isEnvironmentAllowed() && $this->isEventAllowed();
}

/**
* Is environment allowed?
*
* @return bool
*/
protected function isEnvironmentAllowed()
{
return in_array($this->environment, array_get($this->config, 'environments', []));
}

/**
* Is event allowed?
*
* @return bool
*/
protected function isEventAllowed()
{
return !in_array(get_class($this->event), array_get($this->config, 'ignore_events', []));
Expand Down

0 comments on commit a07f63b

Please sign in to comment.