-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixed some class names - fixed psalm errors
- Loading branch information
1 parent
7b1b56f
commit d47e3d3
Showing
28 changed files
with
395 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
errorLevel="1" | ||
findUnusedVariablesAndParams="true" | ||
resolveFromConfigFile="true" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
> | ||
<projectFiles> | ||
<directory name="src"/> | ||
<ignoreFiles> | ||
<directory name="vendor"/> | ||
</ignoreFiles> | ||
</projectFiles> | ||
</psalm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\Days; | ||
|
||
use Butschster\CronExpression\Parts\Days\BetweenDays; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class BetweenDaysTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* * 6-12 * *', new BetweenDays(6, 12)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\Days; | ||
|
||
use Butschster\CronExpression\Parts\Days\EveryDay; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class EveryDayTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* * */3 * *', new EveryDay(3)); | ||
} | ||
|
||
public function testUpdatesExpressionWithoutArgs() | ||
{ | ||
$this->assertExpressionPart('* * * * *', new EveryDay()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\Days; | ||
|
||
use Butschster\CronExpression\Parts\Days\LastDayOfMonth; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class LastDayOfMonthTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* * L * *', new LastDayOfMonth()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\Days; | ||
|
||
use Butschster\CronExpression\Parts\Days\LastWeekday; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class LastWeekdayTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* * LW * *', new LastWeekday()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\Days; | ||
|
||
use Butschster\CronExpression\Parts\Days\SpecificDays; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class SpecificDaysTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* * 2,4,6,8,10,12 * *', new SpecificDays(2, 4, 6, 8, 10, 12)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\DaysOfWeek; | ||
|
||
use Butschster\CronExpression\Generator; | ||
use Butschster\CronExpression\Parts\DaysOfWeek\BetweenDayOfWeek; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class BetweenDayOfWeekTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* * * * 1-6', new BetweenDayOfWeek(Generator::MONDAY, Generator::SATURDAY)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\DaysOfWeek; | ||
|
||
use Butschster\CronExpression\Parts\DaysOfWeek\EveryDayOfWeek; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class EveryDayOfWeekTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* * * * */3', new EveryDayOfWeek(3)); | ||
} | ||
|
||
public function testUpdatesExpressionWithoutArgs() | ||
{ | ||
$this->assertExpressionPart('* * * * *', new EveryDayOfWeek()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\DaysOfWeek; | ||
|
||
use Butschster\CronExpression\Generator; | ||
use Butschster\CronExpression\Parts\DaysOfWeek\LastDayOfWeek; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class LastDayOfWeekTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* * * * 1L', new LastDayOfWeek()); | ||
|
||
$this->assertExpressionPart('* * * * 5L', new LastDayOfWeek(Generator::FRIDAY)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\DaysOfWeek; | ||
|
||
use Butschster\CronExpression\Generator; | ||
use Butschster\CronExpression\Parts\DaysOfWeek\NthDayOfWeek; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class NthDayOfWeekTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* * * * 1#1', new NthDayOfWeek()); | ||
|
||
$this->assertExpressionPart('* * * * 5#3', new NthDayOfWeek(Generator::FRIDAY, 3)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\DaysOfWeek; | ||
|
||
use Butschster\CronExpression\Parts\DaysOfWeek\SpecificDaysOfWeek; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class SpecificDaysOfWeekTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* * * * 2,4,6', new SpecificDaysOfWeek(2, 4, 6)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\Hours; | ||
|
||
use Butschster\CronExpression\Parts\Hours\BetweenHours; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class BetweenHoursTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* 6-12 * * *', new BetweenHours(6, 12)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\Hours; | ||
|
||
use Butschster\CronExpression\Parts\Hours\EveryHour; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class EveryHourTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* */3 * * *', new EveryHour(3)); | ||
} | ||
|
||
public function testUpdatesExpressionWithoutArgs() | ||
{ | ||
$this->assertExpressionPart('* * * * *', new EveryHour()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\Hours; | ||
|
||
use Butschster\CronExpression\Parts\Hours\SpecificHours; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class SpecificHoursTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('* 2,4,6,8,10,12 * * *', new SpecificHours(2, 4, 6, 8, 10, 12)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\Minutes; | ||
|
||
use Butschster\CronExpression\Parts\Minutes\BetweenMinutes; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class BetweenMinutesTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('6-12 * * * *', new BetweenMinutes(6, 12)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butschster\CronExpression\Tests\Parts\Minutes; | ||
|
||
use Butschster\CronExpression\Parts\Minutes\EveryMinute; | ||
use Butschster\CronExpression\Tests\TestCase; | ||
|
||
class EveryMinuteTest extends TestCase | ||
{ | ||
public function testUpdatesExpression() | ||
{ | ||
$this->assertExpressionPart('*/3 * * * *', new EveryMinute(3)); | ||
} | ||
|
||
public function testUpdatesExpressionWithoutArgs() | ||
{ | ||
$this->assertExpressionPart('* * * * *', new EveryMinute()); | ||
} | ||
} |
Oops, something went wrong.