Skip to content

Commit

Permalink
Updating and running Duster
Browse files Browse the repository at this point in the history
  • Loading branch information
driftingly committed Mar 15, 2024
1 parent a5873c7 commit 30d4842
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/duster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: "Duster Fix"
uses: tighten/duster-action@v1
uses: tighten/duster-action@v2
with:
args: fix

Expand Down
2 changes: 1 addition & 1 deletion app/Models/Hit.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Hit extends Model
* year, quarter, month, week, day, weekday, hour,
* minute, second, microsecond
*/
public static function forTimePeriod(string $period = 'week', CarbonImmutable $end = null): array
public static function forTimePeriod(string $period = 'week', ?CarbonImmutable $end = null): array
{
$currentPeriodEnd = $end ?? CarbonImmutable::now();
$currentPeriodStart = $currentPeriodEnd->sub($period, 1)->addSecond();
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Release.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getNeedsPatchAttribute()

public function getChangelogUrlAttribute()
{
return "https://www.php.net/ChangeLog-{$this->major}.php#{$this->__toString()}";
return "https://www.php.net/ChangeLog-{$this->major}.php#{$this->__toString()}";
}

public function __toString()
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.3.3",
"spatie/laravel-ignition": "^1.0",
"tightenco/duster": "^0.7.0"
"tightenco/duster": "^2.7"
},
"autoload": {
"psr-4": {
Expand Down
43 changes: 22 additions & 21 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/Feature/ReleaseControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function it_can_parse_a_php_release_and_return_all_details()
'release' => PHP_RELEASE_VERSION,
]);

$phpVersion = PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION;
$phpVersion = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION;

$this->getJson('api/releases/' . $phpVersion)
->assertJsonStructure([
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/StatsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function it_stores_the_hit()
$this->getJson('api/releases/8.0.0', [
'User-Agent' => 'My Test Agent',
'Referer' => 'http://example.com',
'REMOTE_ADDR' => '127.0.0.1'
'REMOTE_ADDR' => '127.0.0.1',
]);

$this->assertDatabaseHas('hits', [
Expand Down

0 comments on commit 30d4842

Please sign in to comment.