Skip to content

Commit

Permalink
Merge pull request #62 from 749/master
Browse files Browse the repository at this point in the history
Fix PeriodRepository
  • Loading branch information
TobiasFranek authored Jan 25, 2020
2 parents dddd005 + 7758989 commit c2ccb9c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Repositories/PeriodRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ public function findBy(array $params, array $sort = [], int $limit = null, array
* @param string $endDate
* @return AbstractModel[]
*/
public function findAll(array $sort = [], int $limit = null, array $options = []) : array
public function findAll(array $sort = [], int $limit = null, array $options = []) : array
{
if (isset($options['options']['element']['type'])) {
if (!isset($options['options']['element']['type'])) {
$options['options']['element']['type'] = $this->instance->getCurrentUserType();
}
if (isset($options['options']['element']['id'])) {
$options['options']['element']['type'] = $this->instance->getCurrentUser()->getId();
if (!isset($options['options']['element']['id'])) {
$options['options']['element']['id'] = $this->instance->getCurrentUser()->getId();
}
$data = $this->executionHandler->execute($this, $options);

Expand All @@ -78,4 +78,4 @@ public function findAll(array $sort = [], int $limit = null, array $options = []
return $data;
}

}
}

0 comments on commit c2ccb9c

Please sign in to comment.