Skip to content

Commit

Permalink
Merge pull request simshaun#168 from libertjeremy/constraints-getters
Browse files Browse the repository at this point in the history
Getters in constraints
  • Loading branch information
simshaun authored May 12, 2020
2 parents 0ece0d1 + 333e480 commit d8bc5d3
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Recurr/Transformer/Constraint/AfterConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,20 @@ public function test(\DateTimeInterface $date)

return $date > $this->after;
}

/**
* @return \DateTimeInterface
*/
public function getAfter()
{
return $this->after;
}

/**
* @return bool
*/
public function isInc()
{
return $this->inc;
}
}
16 changes: 16 additions & 0 deletions src/Recurr/Transformer/Constraint/BeforeConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,20 @@ public function test(\DateTimeInterface $date)

return $date < $this->before;
}

/**
* @return \DateTimeInterface
*/
public function getBefore()
{
return $this->before;
}

/**
* @return bool
*/
public function isInc()
{
return $this->inc;
}
}
24 changes: 24 additions & 0 deletions src/Recurr/Transformer/Constraint/BetweenConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,28 @@ public function test(\DateTimeInterface $date)

return $date > $this->after && $date < $this->before;
}

/**
* @return \DateTimeInterface
*/
public function getBefore()
{
return $this->before;
}

/**
* @return \DateTimeInterface
*/
public function getAfter()
{
return $this->after;
}

/**
* @return bool
*/
public function isInc()
{
return $this->inc;
}
}

0 comments on commit d8bc5d3

Please sign in to comment.