Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
butschster committed Aug 7, 2021
2 parents c0c827d + 14ccea5 commit 945745c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function toExpression(): string
public function setExpresion(Expression $expression): self
{
$this->expression = $expression;

return $this;
}

Expand Down
2 changes: 0 additions & 2 deletions src/Traits/Years.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace Butschster\CronExpression\Traits;

use Cron\CronExpression;

trait Years
{
public function months(string | int ...$months): self
Expand Down
4 changes: 2 additions & 2 deletions tests/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ public function testEveryXHours()

public function testSetsHours()
{
$this->assertExpression('* 1,2,3 * * *', $this->generator->hours(1,2,3));
$this->assertExpression('* 1,2,3 * * *', $this->generator->hours(1, 2, 3));
$this->assertExpression('* */3 * * *', $this->generator->hours('*/3'));

$this->assertExpression('15 1,2,3 * * *', $this->generator->hourlyAt(15)->hours(1,2,3));
$this->assertExpression('15 1,2,3 * * *', $this->generator->hourlyAt(15)->hours(1, 2, 3));
}

public function testInvalidHoursShouldThrowAnException()
Expand Down

0 comments on commit 945745c

Please sign in to comment.