Skip to content

Commit

Permalink
fixed status check
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Oct 25, 2023
1 parent d670fd7 commit f1fd4e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Contracts/RepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function getOrdered($direction = 'asc');
/**
* Get modules by the given status.
*
* @param int $status
* @param bool $status
*
* @return mixed
*/
Expand Down
6 changes: 3 additions & 3 deletions src/FileRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function has($alias) : bool
*/
public function allEnabled() : array
{
return $this->getByStatus(1);
return $this->getByStatus(true);
}

/**
Expand All @@ -269,7 +269,7 @@ public function allEnabled() : array
*/
public function allDisabled() : array
{
return $this->getByStatus(0);
return $this->getByStatus(false);
}

/**
Expand Down Expand Up @@ -421,7 +421,7 @@ public function findOrFail($alias)
*
* @return Collection
*/
public function collections($status = 1) : Collection
public function collections($status = true) : Collection
{
return new Collection($this->getByStatus($status));
}
Expand Down

0 comments on commit f1fd4e3

Please sign in to comment.