Skip to content

Commit

Permalink
Code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling committed Dec 21, 2024
1 parent aa884ff commit 412b55b
Show file tree
Hide file tree
Showing 23 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion app/Actions/Fortify/PasswordValidationRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected function passwordRules()
return [
'required',
'string',
(new Password())
(new Password)
->length(10)
->requireUppercase()
->requireNumeric()
Expand Down
2 changes: 1 addition & 1 deletion app/Actions/Fortify/UpdateUserProfileInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function update($user, array $input)
'gender' => ['required', 'numeric'],
'location' => ['nullable', 'max:255'],
'about' => ['nullable', 'max:255'],
'birthdate' => ['required', 'date_format:d-m-Y', new OlderThan(), new YoungerThan()],
'birthdate' => ['required', 'date_format:d-m-Y', new OlderThan, new YoungerThan],
'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:3072'],
])->validateWithBag('updateProfileInformation');

Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/ImportFromTumblr.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function handle(): int
$title = str_replace('!', '', $title); // Remove the exclamation mark
$title = ucfirst($title); // Capitalize the first letter of the title
$this->info('Title: '.$title.', Posted by: '.$user->username);
$converter = new HtmlConverter();
$converter = new HtmlConverter;
$markdown = $converter->convert($post->body);
Post::create([
'title' => $title,
Expand Down
8 changes: 4 additions & 4 deletions app/Helpers/DiscordHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function getServer(): \RestCord\Model\Guild\Guild

public static function countMembers(): ?int
{
$client = new self();
$client = new self;
try {
return $client->getServer()->approximate_member_count;
} catch (\Exception $exception) {
Expand All @@ -41,7 +41,7 @@ public static function countMembers(): ?int

public static function getServerRoles(): \Exception|array
{
$client = new self();
$client = new self;
try {
return $client->discordClient->guild->getGuildRoles([
'guild.id' => $client->guildId,
Expand All @@ -55,7 +55,7 @@ public static function getServerRoles(): \Exception|array

public static function getMemberRoles(int $user_id): \RestCord\Model\Guild\GuildMember|\Exception
{
$client = new self();
$client = new self;
try {
return $client->discordClient->guild->getGuildMember([
'guild.id' => $client->guildId,
Expand All @@ -70,7 +70,7 @@ public static function getMemberRoles(int $user_id): \RestCord\Model\Guild\Guild

public static function setMemberRole(int $user_id, int $role_id): array|string
{
$client = new self();
$client = new self;
try {
return $client->discordClient->guild->addGuildMemberRole([
'guild.id' => $client->guildId,
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/DiscordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function handleProviderCallback()
DiscordAccount::create($userProfile);
auth()
->user()
->unlock(new AssociatedDiscord());
->unlock(new AssociatedDiscord);

return redirect()->route('profile.show');
} catch (InvalidStateException $e) {
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/FacebookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function handleProviderCallback()
FacebookAccount::create($userProfile);
auth()
->user()
->unlock(new AssociatedFacebook());
->unlock(new AssociatedFacebook);

return redirect()->route('profile.show');
} catch (InvalidStateException $e) {
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/TwitchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function handleProviderCallback()
TwitchAccount::create($userProfile);
auth()
->user()
->unlock(new AssociatedTwitch());
->unlock(new AssociatedTwitch);

return redirect()->route('profile.show');
} catch (InvalidStateException $e) {
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/TwitterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function handleProviderCallback(): \Illuminate\Http\RedirectResponse
TwitterAccount::create($userProfile);
auth()
->user()
->unlock(new AssociatedTwitter());
->unlock(new AssociatedTwitter);

return redirect()->route('profile.show');
} catch (InvalidStateException $e) {
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Skin/ImportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function import(Request $request, $id)
}
$url = 'https://pokemon3d.net/skin/data/'.$id.'.png';
$valid_types = ['image/png']; // Valid file types
$client = new Client();
$client = new Client;
try {
$response = $client->get($url);
if (
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Livewire/Profile/ConnectGamejoltAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function save()
Artisan::call('p3d:skinuserupdate');

// Unlock achievement
$user->unlock(new AssociatedGamejolt());
$user->unlock(new AssociatedGamejolt);

$this->username = $gamejolt->username;
$this->token = $gamejolt->token;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Livewire/Resource/ResourceForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ResourceForm extends ModalComponent

public function mount(int|Resource|null $resource = null)
{
$this->resource = $resource ? Resource::find($resource) : new Resource();
$this->resource = $resource ? Resource::find($resource) : new Resource;
$this->category = $this->resource->categories->first()->id ?? 0;
$this->categories = Category::all();
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Livewire/Server/ServerCreateForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function save(): Redirector

$this->validate([
'name' => ['required', 'string', new StrNotContain('official'), 'ascii'],
'host' => ['required', new StrNotContain('pokemon3d.net'), new IPHostnameARecord(), 'lowercase'],
'host' => ['required', new StrNotContain('pokemon3d.net'), new IPHostnameARecord, 'lowercase'],
'port' => ['required', 'integer', 'min:10', 'max:99999'],
'description' => ['nullable', 'string'],
]);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Livewire/Server/ServerEditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function save(): Redirector

$this->validate([
'name' => ['required', 'string', new StrNotContain('official'), 'ascii'],
'host' => ['required', new StrNotContain('pokemon3d.net'), new IPHostnameARecord(), 'lowercase'],
'host' => ['required', new StrNotContain('pokemon3d.net'), new IPHostnameARecord, 'lowercase'],
'port' => ['required', 'integer', 'min:10', 'max:99999'],
'description' => ['nullable', 'string'],
]);
Expand Down
2 changes: 1 addition & 1 deletion app/Notifications/NewGameUpdateNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function toMail($notifiable)
{
$btn_text = $this->gameVersion->post ? 'View blog post' : 'View changelog';

return (new MailMessage())
return (new MailMessage)
->line($this->message)
->line($this->gameVersion->title)
->action(
Expand Down
2 changes: 1 addition & 1 deletion app/Notifications/Post/CommentLikeNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function via($notifiable)
*/
public function toMail($notifiable)
{
return (new MailMessage())
return (new MailMessage)
->line($this->message)
->action('View', route('blog.show', $this->comment->commentable->uuid));
}
Expand Down
2 changes: 1 addition & 1 deletion app/Notifications/Post/CommentNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function via($notifiable)
*/
public function toMail($notifiable)
{
return (new MailMessage())
return (new MailMessage)
->line($this->message)
->action('View', route('blog.show', $this->comment->commentable->uuid));
}
Expand Down
2 changes: 1 addition & 1 deletion app/Notifications/Post/CommentReplyNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function via($notifiable)
*/
public function toMail($notifiable)
{
return (new MailMessage())
return (new MailMessage)
->line($this->message)
->action('View', route('blog.show', $this->comment->commentable->uuid));
}
Expand Down
2 changes: 1 addition & 1 deletion app/Notifications/Resource/LikeNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function via($notifiable)
*/
public function toMail($notifiable)
{
return (new MailMessage())->line($this->message)->action('View', route('resource.uuid', $this->resource->uuid));
return (new MailMessage)->line($this->message)->action('View', route('resource.uuid', $this->resource->uuid));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Notifications/Skin/LikeNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function via($notifiable)
*/
public function toMail($notifiable)
{
return (new MailMessage())->line($this->message)->action('View', route('skin-show', $this->skin->uuid));
return (new MailMessage)->line($this->message)->action('View', route('skin-show', $this->skin->uuid));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Nova/Dashboards/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class Main extends Dashboard
*/
public function cards()
{
return [new Help()];
return [new Help];
}
}
2 changes: 1 addition & 1 deletion app/Nova/Dashboards/UserInsights.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UserInsights extends Dashboard
*/
public function cards()
{
return [new NewUsers(), new UsersPerDay()];
return [new NewUsers, new UsersPerDay];
}

/**
Expand Down
6 changes: 3 additions & 3 deletions app/Providers/NovaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function gate()
*/
protected function dashboards()
{
return [new \App\Nova\Dashboards\Main(), new \App\Nova\Dashboards\UserInsights()];
return [new \App\Nova\Dashboards\Main, new \App\Nova\Dashboards\UserInsights];
}

/**
Expand All @@ -103,8 +103,8 @@ protected function dashboards()
public function tools()
{
return [
new \Bolechen\NovaActivitylog\NovaActivitylog(),
new \Spatie\BackupTool\BackupTool(),
new \Bolechen\NovaActivitylog\NovaActivitylog,
new \Spatie\BackupTool\BackupTool,
\Vyuldashev\NovaPermission\NovaPermissionTool::make(),
];
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/ExampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ExampleTest extends TestCase
*
* @return void
*/
public function testBasicTest()
public function test_basic_test()
{
$this->assertTrue(true);
}
Expand Down

0 comments on commit 412b55b

Please sign in to comment.