Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
danilopolani committed Oct 30, 2023
1 parent 27a034f commit 83c4c29
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
6 changes: 5 additions & 1 deletion pint.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"curly_braces_position": {
"anonymous_classes_opening_brace": "same_line"
},
"fully_qualified_strict_types": false
"fully_qualified_strict_types": false,
"blank_line_between_import_groups": false,
"braces_position": {
"anonymous_classes_opening_brace": "same_line"
}
}
}
2 changes: 1 addition & 1 deletion src/Jobs/SendMailJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function handle(): void
*/
protected function send(): void
{
$sendMail = fn (?GenericMailDto $override = null) => Mail::send(new GenericMail($override ?: $this->genericMailDto));
$sendMail = fn (GenericMailDto $override = null) => Mail::send(new GenericMail($override ?: $this->genericMailDto));

if ($this->sendingMiddleware) {
$middleware = unserialize($this->sendingMiddleware)->getClosure();
Expand Down
14 changes: 7 additions & 7 deletions src/MailCarrierManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MailCarrierManager
/**
* Intercept a mail ready to be sent and write a middleware around it.
*
* @param Closure(\MailCarrier\Dto\GenericMailDto $mail, \Closure $next): void $callback
* @param Closure(\MailCarrier\Dto\GenericMailDto $mail, \Closure $next): void $callback
*/
public function sending(Closure $callback): void
{
Expand All @@ -32,7 +32,7 @@ public function sending(Closure $callback): void
/**
* Invoke a custom callback before a sending a mail (sync).
*
* @param Closure(\MailCarrier\Dto\GenericMailDto $mail): void $callback
* @param Closure(\MailCarrier\Dto\GenericMailDto $mail): void $callback
*/
public function beforeSending(Closure $callback): void
{
Expand All @@ -42,7 +42,7 @@ public function beforeSending(Closure $callback): void
/**
* Define the gate to authorize a user via social authentication.
*
* @param Closure(\Laravel\Socialite\AbstractUser $user): bool $callback
* @param Closure(\Laravel\Socialite\AbstractUser $user): bool $callback
*/
public function authorizeSocialAuth(Closure $callback): void
{
Expand Down Expand Up @@ -90,15 +90,15 @@ public function getSocialAuthDriver(): ?string
/**
* Get the disk storage.
*/
public function storage(?string $disk = null): Filesystem
public function storage(string $disk = null): Filesystem
{
return Storage::disk($disk ?: Config::get('mailcarrier.attachments.disk'));
}

/**
* Determine if the a file exists on the disk.
*/
public function fileExists(string $resource, ?string $disk = null): bool
public function fileExists(string $resource, string $disk = null): bool
{
return $this->storage($disk)->exists($resource);
}
Expand Down Expand Up @@ -127,7 +127,7 @@ public function upload(string $content, string $fileName): string
/**
* Download a file from the storage disk.
*/
public function download(string $resource, ?string $disk = null): ?string
public function download(string $resource, string $disk = null): ?string
{
$content = $this->storage($disk)->get($resource);

Expand All @@ -137,7 +137,7 @@ public function download(string $resource, ?string $disk = null): ?string
/**
* Get the file size from the storage disk.
*/
public function getFileSize(string $resource, ?string $disk = null): int
public function getFileSize(string $resource, string $disk = null): int
{
return $this->storage($disk)->size($resource);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
class Log extends Model
{
use HasFactory;
use MassPrunable;
use IsUuid;
use MassPrunable;

/**
* Indicates if the IDs are auto-incrementing.
Expand Down

0 comments on commit 83c4c29

Please sign in to comment.