From b1e81cfe42ca7c26c1320e5fe20a30a235b0e7a1 Mon Sep 17 00:00:00 2001 From: Guajiro <276488307+Guajir0-code@users.noreply.github.com> Date: Wed, 5 Aug 2026 10:06:12 -0300 Subject: [PATCH 1/3] style: apply pint to app/ Mechanical, produced by `vendor/bin/pint`. No behaviour change. Co-Authored-By: Claude Opus 5 --- app/Services/EmbedProcessorService.php | 63 ++++++++++++++------------ app/Services/WpAuthService.php | 8 ++-- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/app/Services/EmbedProcessorService.php b/app/Services/EmbedProcessorService.php index 650bb65..9bd9f4b 100644 --- a/app/Services/EmbedProcessorService.php +++ b/app/Services/EmbedProcessorService.php @@ -2,8 +2,8 @@ namespace App\Services; -use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; class EmbedProcessorService @@ -40,14 +40,14 @@ private static function processTwitterEmbeds(string $content): string $embedHtml = self::getTwitterOEmbed($url); if ($embedHtml) { - return '
' . $embedHtml . '
'; + return '
'.$embedHtml.'
'; } // Fallback: create a basic embed structure that Twitter widget.js can enhance - return '
' . - '' . + return '
'. + ''. '
'; } @@ -60,7 +60,7 @@ private static function processTwitterEmbeds(string $content): string */ private static function getTwitterOEmbed(string $url): ?string { - $cacheKey = 'twitter_oembed_' . md5($url); + $cacheKey = 'twitter_oembed_'.md5($url); return Cache::remember($cacheKey, 86400, function () use ($url) { try { @@ -72,10 +72,11 @@ private static function getTwitterOEmbed(string $url): ?string if ($response->successful()) { $data = $response->json(); + return $data['html'] ?? null; } } catch (\Exception $e) { - Log::warning('Failed to fetch Twitter oEmbed: ' . $e->getMessage()); + Log::warning('Failed to fetch Twitter oEmbed: '.$e->getMessage()); } return null; @@ -93,14 +94,14 @@ private static function processYouTubeEmbeds(string $content): string return preg_replace_callback($pattern, function ($matches) { $videoId = $matches[2]; - return '
' . - '' . + return '
'. + ''. '
'; }, $content) ?? $content; } @@ -121,14 +122,14 @@ private static function processInstagramEmbeds(string $content): string $embedHtml = self::getInstagramOEmbed($url); if ($embedHtml) { - return '
' . $embedHtml . '
'; + return '
'.$embedHtml.'
'; } // Fallback - return '
' . - '
' . - 'Ver no Instagram' . - '
' . + return '
'. + '
'. + 'Ver no Instagram'. + '
'. '
'; }, $content) ?? $content; } @@ -138,7 +139,7 @@ private static function processInstagramEmbeds(string $content): string */ private static function getInstagramOEmbed(string $url): ?string { - $cacheKey = 'instagram_oembed_' . md5($url); + $cacheKey = 'instagram_oembed_'.md5($url); return Cache::remember($cacheKey, 86400, function () use ($url) { try { @@ -149,10 +150,11 @@ private static function getInstagramOEmbed(string $url): ?string if ($response->successful()) { $data = $response->json(); + return $data['html'] ?? null; } } catch (\Exception $e) { - Log::warning('Failed to fetch Instagram oEmbed: ' . $e->getMessage()); + Log::warning('Failed to fetch Instagram oEmbed: '.$e->getMessage()); } return null; @@ -174,14 +176,14 @@ private static function processRedditEmbeds(string $content): string $embedHtml = self::getRedditOEmbed($url); if ($embedHtml) { - return '
' . $embedHtml . '
'; + return '
'.$embedHtml.'
'; } // Fallback: link to the Reddit post - return '
' . - '
' . - 'Ver no Reddit' . - '
' . + return '
'. + '
'. + 'Ver no Reddit'. + '
'. '
'; }, $content) ?? $content; } @@ -191,7 +193,7 @@ private static function processRedditEmbeds(string $content): string */ private static function getRedditOEmbed(string $url): ?string { - $cacheKey = 'reddit_oembed_' . md5($url); + $cacheKey = 'reddit_oembed_'.md5($url); return Cache::remember($cacheKey, 86400, function () use ($url) { try { @@ -201,10 +203,11 @@ private static function getRedditOEmbed(string $url): ?string if ($response->successful()) { $data = $response->json(); + return $data['html'] ?? null; } } catch (\Exception $e) { - Log::warning('Failed to fetch Reddit oEmbed: ' . $e->getMessage()); + Log::warning('Failed to fetch Reddit oEmbed: '.$e->getMessage()); } return null; diff --git a/app/Services/WpAuthService.php b/app/Services/WpAuthService.php index 845e68b..faecdd5 100644 --- a/app/Services/WpAuthService.php +++ b/app/Services/WpAuthService.php @@ -54,7 +54,7 @@ private static function parseWpCookie(string $cookieValue): ?array // Find user in WordPress database $user = WpUser::where('user_login', $username)->first(); - if (!$user) { + if (! $user) { Log::debug('WpAuth: User not found in database', ['username' => $username]); return null; @@ -63,7 +63,7 @@ private static function parseWpCookie(string $cookieValue): ?array Log::debug('WpAuth: User found', ['user_id' => $user->ID]); // Check if user has admin capabilities - if (!self::userHasAdminCapability($user->ID)) { + if (! self::userHasAdminCapability($user->ID)) { Log::debug('WpAuth: User does not have admin capabilities', ['user_id' => $user->ID]); return null; @@ -90,7 +90,7 @@ private static function userHasAdminCapability(int $userId): bool ->where('meta_key', 'like', '%_capabilities') ->first(); - if (!$capabilities) { + if (! $capabilities) { Log::debug('WpAuth: No capabilities meta found', ['user_id' => $userId]); return false; @@ -100,7 +100,7 @@ private static function userHasAdminCapability(int $userId): bool $caps = @unserialize($capabilities->meta_value); - if (!\is_array($caps)) { + if (! \is_array($caps)) { Log::debug('WpAuth: Failed to unserialize capabilities'); return false; From 8867a989b453ea19fe451b71c3edf0b64e96fda7 Mon Sep 17 00:00:00 2001 From: Guajiro <276488307+Guajir0-code@users.noreply.github.com> Date: Wed, 5 Aug 2026 10:06:42 -0300 Subject: [PATCH 2/3] style: apply prettier to resources/ Mechanical, produced by `npm run format`. Mostly line wrapping. The organize-imports plugin also dropped an unused getPortugueseMonth import in TagPosts.vue, which was the single outstanding eslint error. Co-Authored-By: Claude Opus 5 --- resources/css/app.css | 19 +++++++----- resources/js/components/Carousel.vue | 16 +++++----- resources/js/components/CarouselCard.vue | 2 +- resources/js/components/Footer.vue | 7 +---- resources/js/components/Header.vue | 4 +-- resources/js/components/PostCardList.vue | 9 ++++-- resources/js/components/PostContentAuthor.vue | 2 +- .../js/components/PostContentRelated.vue | 16 +++------- resources/js/components/PostContentTags.vue | 16 ++++++---- resources/js/components/PostContentText.vue | 20 ++++++------ resources/js/components/WpAdminBar.vue | 20 +++++++----- resources/js/pages/TagPosts.vue | 4 +-- resources/js/ssr.ts | 31 ++++++++++--------- resources/js/templates/MainTemplate.vue | 4 +-- resources/js/types/index.d.ts | 18 +++++------ 15 files changed, 97 insertions(+), 91 deletions(-) diff --git a/resources/css/app.css b/resources/css/app.css index 55eaa7c..faa0fab 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,5 +1,5 @@ @import 'tailwindcss'; -@import "tw-animate-css"; +@import 'tw-animate-css'; @source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php'; @source '../../storage/framework/views/*.php'; @@ -7,7 +7,9 @@ @custom-variant dark (&:is(.dark *)); @theme inline { - --font-sans: 'Montserrat', Instrument Sans, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + --font-sans: + 'Montserrat', Instrument Sans, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', + 'Noto Color Emoji'; --color-sidebar-ring: var(--sidebar-ring); --color-sidebar-border: var(--sidebar-border); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); @@ -48,8 +50,9 @@ @font-face { font-family: 'Inversionz'; - src: url('/fonts/Inversionz.ttf') format('truetype'), - url('/fonts/Inversionz-Italic.ttf') format('truetype'); + src: + url('/fonts/Inversionz.ttf') format('truetype'), + url('/fonts/Inversionz-Italic.ttf') format('truetype'); font-weight: normal; font-style: normal; } @@ -126,10 +129,10 @@ } @layer base { - * { - @apply border-border outline-ring/50; + * { + @apply border-border outline-ring/50; } - body { - @apply bg-background text-foreground; + body { + @apply bg-background text-foreground; } } diff --git a/resources/js/components/Carousel.vue b/resources/js/components/Carousel.vue index 5386bec..f6dfdd8 100644 --- a/resources/js/components/Carousel.vue +++ b/resources/js/components/Carousel.vue @@ -45,13 +45,15 @@ watchOnce(api, (api) => { :opts="{ loop: true, }" - :plugins="[Autoplay({ - delay: 5000, - active: true, - stopOnFocusIn: false, - stopOnInteraction: false, - stopOnMouseEnter: false, - })]" + :plugins="[ + Autoplay({ + delay: 5000, + active: true, + stopOnFocusIn: false, + stopOnInteraction: false, + stopOnMouseEnter: false, + }), + ]" > diff --git a/resources/js/components/CarouselCard.vue b/resources/js/components/CarouselCard.vue index 1e57bdd..0ff98ec 100644 --- a/resources/js/components/CarouselCard.vue +++ b/resources/js/components/CarouselCard.vue @@ -27,7 +27,7 @@ const getExcerpt = (post: Post) => {
- - Política de privacidade - + Política de privacidade
diff --git a/resources/js/components/Header.vue b/resources/js/components/Header.vue index 6b52f4c..138c1d6 100644 --- a/resources/js/components/Header.vue +++ b/resources/js/components/Header.vue @@ -1,9 +1,9 @@ diff --git a/resources/js/components/PostContentAuthor.vue b/resources/js/components/PostContentAuthor.vue index eaaf503..acd880e 100644 --- a/resources/js/components/PostContentAuthor.vue +++ b/resources/js/components/PostContentAuthor.vue @@ -15,7 +15,7 @@ defineProps<{