Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): Bump dependabot/fetch-metadata from 1.6.0 to 2.0.0 #68

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
uses: dependabot/fetch-metadata@v2.0.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
10 changes: 5 additions & 5 deletions src/Concerns/GiveExperience.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ trait GiveExperience

public function addPoints(
int $amount,
int $multiplier = null,
string $type = null,
string $reason = null
?int $multiplier = null,
?string $type = null,
?string $reason = null
): Experience {
if ($type === null) {
$type = AuditType::Add->value;
Expand Down Expand Up @@ -150,7 +150,7 @@ public function experienceHistory(): HasMany
return $this->hasMany(related: ExperienceAudit::class);
}

public function deductPoints(int $amount, string $reason = null): Experience
public function deductPoints(int $amount, ?string $reason = null): Experience
{
if ($this->experience()->doesntExist()) {
return $this->experience;
Expand Down Expand Up @@ -195,7 +195,7 @@ public function withMultiplierData(array|callable $data): static
return $this;
}

public function nextLevelAt(int $checkAgainst = null, bool $showAsPercentage = false): int
public function nextLevelAt(?int $checkAgainst = null, bool $showAsPercentage = false): int
{
$nextLevel = Level::firstWhere(column: 'level', operator: '=', value: is_null($checkAgainst) ? $this->getLevel() + 1 : $checkAgainst);

Expand Down
2 changes: 1 addition & 1 deletion src/Concerns/HasStreaks.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function hasStreakToday(Activity $activity): bool
->isToday();
}

public function freezeStreak(Activity $activity, int $days = null): bool
public function freezeStreak(Activity $activity, ?int $days = null): bool
{
$days = $days ?? config(key: 'level-up.freeze_duration');

Expand Down
2 changes: 1 addition & 1 deletion src/Services/LeaderboardService.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct()
$this->userModel = config(key: 'level-up.user.model');
}

public function generate(bool $paginate = false, int $limit = null): array|Collection|LengthAwarePaginator
public function generate(bool $paginate = false, ?int $limit = null): array|Collection|LengthAwarePaginator
{
return $this->userModel::query()
->with(relations: ['experience', 'level'])
Expand Down
1 change: 1 addition & 0 deletions tests/Concerns/HasStreaksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use LevelUp\Experience\Events\StreakStarted;
use LevelUp\Experience\Events\StreakUnfroze;
use LevelUp\Experience\Models\Activity;

use function Pest\Laravel\travel;

uses()->group('streaks');
Expand Down
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

// A custom expectation to check if a Carbon instance matches a given string
// Stolen from https://github.com/spatie/pest-plugin-test-time
expect()->extend(name: 'toBeCarbon', extend: function (string $expected, string $format = null) {
expect()->extend(name: 'toBeCarbon', extend: function (string $expected, ?string $format = null) {
if ($format === null) {
$format = str_contains($expected, ':')
? 'Y-m-d H:i:s'
Expand Down