Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Apply fixes from StyleCI
  • Loading branch information
StyleCIBot committed Feb 26, 2022
commit c3b61dbdccbba34c6f64f03069637b9cd2f2a630
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ private function schedule(): void
// is the date in the past? if so, we need to schedule the reminder
// for next year
if ($this->upcomingDate->isPast()) {

$this->upcomingDate->year = Carbon::now()->year;
if ($this->upcomingDate->isPast()) {
$this->upcomingDate->year = Carbon::now()->addYear()->year;
Expand Down
3 changes: 1 addition & 2 deletions database/factories/ScheduledContactReminderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

namespace Database\Factories;

use App\Models\User;
use App\Models\ContactReminder;
use App\Models\ScheduledContactReminder;
use App\Models\UserNotificationChannel;
use App\Models\ScheduledContactReminder;
use Illuminate\Database\Eloquent\Factories\Factory;

class ScheduledContactReminderFactory extends Factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,16 @@

namespace Tests\Unit\Services\Contact\ManageReminder;

use Carbon\Carbon;
use Tests\TestCase;
use App\Models\User;
use App\Models\Vault;
use App\Models\Account;
use App\Models\Contact;
use App\Jobs\CreateAuditLog;
use App\Jobs\CreateContactLog;
use App\Models\ContactReminder;
use Illuminate\Support\Facades\Queue;
use Illuminate\Validation\ValidationException;
use App\Exceptions\NotEnoughPermissionException;
use App\Models\UserNotificationChannel;
use App\Services\Contact\ManageReminder\CreateReminder;
use App\Services\Contact\ManageReminder\ScheduleContactReminder;
use Carbon\Carbon;
use Illuminate\Validation\ValidationException;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use App\Services\Contact\ManageReminder\ScheduleContactReminder;

class ScheduleContactReminderTest extends TestCase
{
Expand Down Expand Up @@ -112,7 +105,6 @@ public function it_schedules_a_reminder_of_date_in_the_past_in_another_timezone_

//public function it_doesnt_schedule_a_reminder_if_no_user_notification_channel_is_defined(): void


/** @test */
public function it_fails_if_wrong_parameters_are_given(): void
{
Expand Down