Skip to content

Commit 4027d6b

Browse files
author
Backstage
committed
Add Laravel mails to monosplit
1 parent 4a8d490 commit 4027d6b

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
function geo($attribute = '')
55
{
66
if (! session('geo')) {
7-
$geo = json_decode(@file_get_contents('https://pro.ip-api.com/json/'.request()->ip().'?key='.config('services.ip-api.key')));
7+
$geo = json_decode(@file_get_contents('https://pro.ip-api.com/json/' . request()->ip() . '?key=' . config('services.ip-api.key')));
88

99
session()->put('geo', $geo);
1010
} else {

src/Console/Commands/DeleteUser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DeleteUser extends Command
1818
public function handle()
1919
{
2020
if ($this->option('force-delete') && posix_geteuid() !== 0) {
21-
error('This command must be run as root. Try: sudo php artisan '.str($this->signature)->replace(['{', '}'], '')->toString());
21+
error('This command must be run as root. Try: sudo php artisan ' . str($this->signature)->replace(['{', '}'], '')->toString());
2222

2323
return Command::FAILURE;
2424
}
@@ -33,7 +33,7 @@ public function handle()
3333

3434
$users = multiselect(
3535
label: 'Select the user(s) to delete',
36-
options: $userCollection->pluck('name', 'id')->map(fn ($name, $id) => $name.' (ID: '.$id.')')->toArray(),
36+
options: $userCollection->pluck('name', 'id')->map(fn ($name, $id) => $name . ' (ID: ' . $id . ')')->toArray(),
3737
required: true,
3838
);
3939

@@ -59,7 +59,7 @@ public function handle()
5959
$user->delete();
6060
}
6161

62-
$this->info($this->option('force-delete') ? 'Force deleted' : 'Deleted'.' user: '.$user->name);
62+
$this->info($this->option('force-delete') ? 'Force deleted' : 'Deleted' . ' user: ' . $user->name);
6363
}
6464
}
6565
}

src/Console/Commands/ListUsersCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function handle(): void
3131
return;
3232
}
3333

34-
info('Found '.$users->count().' user(s):');
34+
info('Found ' . $users->count() . ' user(s):');
3535

3636
$this->renderTable($users);
3737

@@ -46,7 +46,7 @@ public function handle(): void
4646
$userId = search(
4747
label: 'Search for the user that should receive the mail',
4848
options: fn (string $value) => strlen($value) > 0
49-
? User::whereLike('name', "%{$value}%")->pluck('name', 'id')->map(fn ($name, $id) => $name.' (ID: '.$id.')')->toArray()
49+
? User::whereLike('name', "%{$value}%")->pluck('name', 'id')->map(fn ($name, $id) => $name . ' (ID: ' . $id . ')')->toArray()
5050
: []
5151
);
5252

@@ -169,7 +169,7 @@ protected function renderTable(Collection $users)
169169
$user->email,
170170
$user->hasVerifiedEmail() ? 'Yes' : 'No',
171171
$user->getRoleNames()->implode(', ') ?: 'No roles',
172-
$user->created_at->format('Y-m-d H:i:s').' ('.$user->created_at->diffForHumans().')',
172+
$user->created_at->format('Y-m-d H:i:s') . ' (' . $user->created_at->diffForHumans() . ')',
173173

174174
])->toArray());
175175
}

src/Console/Commands/MakeUserCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function handle(): int
106106
$this->line("Name: {$user->name}");
107107
$this->line("Email: {$user->email}");
108108
if ($selectedRole) {
109-
$this->line('Role: '.($selectedRole instanceof Role ? $selectedRole->name : $selectedRole));
109+
$this->line('Role: ' . ($selectedRole instanceof Role ? $selectedRole->name : $selectedRole));
110110
}
111111
$this->line("Password: {$password}");
112112

src/Domain/Email/Actions/ValidateEmail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ValidateEmail
88
{
99
use AsAction;
1010

11-
public function handle(string|array $email): bool|array
11+
public function handle(string | array $email): bool | array
1212
{
1313
if (is_array($email)) {
1414
return $this->validateMultipleEmails($email);

src/LaravelUsersServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function configurePackage(Package $package): void
3131

3232
protected function getMigrations(): array
3333
{
34-
$migrationPath = __DIR__.'/../database/migrations/';
34+
$migrationPath = __DIR__ . '/../database/migrations/';
3535

3636
$files = File::allFiles($migrationPath);
3737

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ protected function setUp(): void
1313
parent::setUp();
1414

1515
Factory::guessFactoryNamesUsing(
16-
fn (string $modelName) => 'Backstage\\Laravel\\Users\\Database\\Factories\\'.class_basename($modelName).'Factory'
16+
fn (string $modelName) => 'Backstage\\Laravel\\Users\\Database\\Factories\\' . class_basename($modelName) . 'Factory'
1717
);
1818
}
1919

0 commit comments

Comments
 (0)