Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
okaufmann authored and github-actions[bot] committed Aug 18, 2023
1 parent fca73a3 commit 221a123
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 15 deletions.
4 changes: 0 additions & 4 deletions src/Casts/CompressedText.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class CompressedText implements CastsAttributes
* Cast the given value.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $key
* @param mixed $value
* @param array $attributes
* @return mixed
*/
public function get($model, string $key, $value, array $attributes)
Expand All @@ -24,9 +22,7 @@ public function get($model, string $key, $value, array $attributes)
* Prepare the given value for storage.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $key
* @param mixed $value
* @param array $attributes
* @return mixed
*/
public function set($model, string $key, $value, array $attributes)
Expand Down
2 changes: 1 addition & 1 deletion src/Concerns/LogNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function getCurrentAttempt(): int
return 0;
}

public function setCurrentAttempt(?int $attempt = null): void
public function setCurrentAttempt(int $attempt = null): void
{
if ($attempt === null) {
$attempt = $this->getCurrentAttempt() + 1;
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/ShouldLogNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ interface ShouldLogNotification
{
public function getCurrentAttempt(): int;

public function setCurrentAttempt(?int $attempt = null): void;
public function setCurrentAttempt(int $attempt = null): void;
}
4 changes: 0 additions & 4 deletions src/Loggers/SentMessageLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ protected function convertHeaders(Headers $getHeaders): array

/**
* @param DataPart[] $getAttachments
* @return array
*/
protected function listAttachments(array $getAttachments): array
{
Expand All @@ -75,8 +74,6 @@ protected function listAttachments(array $getAttachments): array

/**
* Get the name of the mailable.
*
* @param \Illuminate\Mail\Events\MessageSent $event
*/
protected function getMailable(MessageSent $event): array
{
Expand All @@ -90,7 +87,6 @@ protected function getMailable(MessageSent $event): array
/**
* Determine whether the mailable was queued.
*
* @param \Illuminate\Mail\Events\MessageSent $event
* @return bool
*/
protected function getQueuedStatus(MessageSent $event)
Expand Down
1 change: 0 additions & 1 deletion src/Loggers/SentNotificationLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ public function resolveMessage(string $channel, Notification $notification, $not
* Format the given notifiable into a tag.
*
* @param mixed $notifiable
* @return string
*/
private function formatNotifiable($notifiable): string
{
Expand Down
1 change: 0 additions & 1 deletion src/Notifications/ChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function send($notifiables, $notification)
*
* @param \Illuminate\Support\Collection|array|mixed $notifiables
* @param mixed $notification
* @param array|null $channels
* @return void
*/
public function sendNow($notifiables, $notification, array $channels = null)
Expand Down
3 changes: 2 additions & 1 deletion tests/Feature/MessageEventListenerTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

use Illuminate\Notifications\Events\NotificationSending;
use function Pest\Laravel\assertDatabaseCount;
use Teamnovu\LaravelNotificationLog\Listeners\MessageEventListener;
use Teamnovu\LaravelNotificationLog\Tests\Support\DummyNotifiable;
use Teamnovu\LaravelNotificationLog\Tests\Support\DummyNotification;

use function Pest\Laravel\assertDatabaseCount;

it('can does not log a sending notification message when disabled in configuration', function () {
$notifiable = new DummyNotifiable();
$notification = new DummyNotification();
Expand Down
5 changes: 3 additions & 2 deletions tests/Feature/SentSentNotificationLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
use Illuminate\Notifications\Events\NotificationSending;
use Illuminate\Notifications\Events\NotificationSent;
use Illuminate\Support\Arr;
use function Pest\Laravel\assertDatabaseCount;
use function Pest\Laravel\assertDatabaseHas;
use Teamnovu\LaravelNotificationLog\Loggers\SentNotificationLogger;
use Teamnovu\LaravelNotificationLog\Tests\Support\DummyFailingNotification;
use Teamnovu\LaravelNotificationLog\Tests\Support\DummyNotifiable;
use Teamnovu\LaravelNotificationLog\Tests\Support\DummyNotification;

use function Pest\Laravel\assertDatabaseCount;
use function Pest\Laravel\assertDatabaseHas;

it('can log a sending notification event', function () {
$notifiable = new DummyNotifiable();
$notification = new DummyNotification();
Expand Down

0 comments on commit 221a123

Please sign in to comment.