Skip to content

Commit

Permalink
refactor: added missing documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Frey <[email protected]>
  • Loading branch information
lukas-frey committed Jan 19, 2023
1 parent 860e82f commit aa43091
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Concerns/HasEnvironments.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,34 @@ trait HasEnvironments
{
public array $environments = [];

/**
* Sets the allowed environments.
*
* @param array $environments
* @return $this
*/
public function environments(array $environments): static
{
$this->environments = $environments;

return $this;
}

/**
* Returns the allowed environments.
*
* @return array
*/
public function getEnvironments(): array
{
return $this->environments;
}

/**
* Checks whether the environment is valid.
*
* @return bool
*/
public function checkEnvironment(): bool
{
return empty($this->getEnvironments()) || app()->environment($this->getEnvironments());
Expand Down

0 comments on commit aa43091

Please sign in to comment.