<commit_before><?php

declare(strict_types=1);

namespace App\Http\Controllers;

use App\Models\Bookmark;
use Illuminate\View\View;

class BookmarksController extends Controller
{
    /**
     * Show the most recent bookmarks.
     *
     * @return View
     */
    public function index(): View
    {
        $bookmarks = Bookmark::latest()->with('tags')->withCount('tags')->paginate(10);

        return view('bookmarks.index', compact('bookmarks'));
    }

    /**
     * Show a single bookmark.
     *
     * @param  Bookmark  $bookmark
     * @return View
     */
    public function show(Bookmark $bookmark): View
    {
        $bookmark->loadMissing('tags');

        return view('bookmarks.show', compact('bookmark'));
    }

    /**
     * Show bookmakrs tagged with a specific tag.
     *
     * @param  string  $tag
     * @return View
     */
    public function tagged(string $tag): View
    {
        $bookmarks = Bookmark::whereHas('tags', function ($query) use ($tag) {
            $query->where('tag', $tag);
        })->latest()->with('tags')->withCount('tags')->paginate(10);

        return view('bookmarks.tagged', compact('bookmarks', 'tag'));
    }
}<commit_msg>Fix a typo in a comment<commit_after><?php

declare(strict_types=1);

namespace App\Http\Controllers;

use App\Models\Bookmark;
use Illuminate\View\View;

class BookmarksController extends Controller
{
    /**
     * Show the most recent bookmarks.
     *
     * @return View
     */
    public function index(): View
    {
        $bookmarks = Bookmark::latest()->with('tags')->withCount('tags')->paginate(10);

        return view('bookmarks.index', compact('bookmarks'));
    }

    /**
     * Show a single bookmark.
     *
     * @param  Bookmark  $bookmark
     * @return View
     */
    public function show(Bookmark $bookmark): View
    {
        $bookmark->loadMissing('tags');

        return view('bookmarks.show', compact('bookmark'));
    }

    /**
     * Show bookmarks tagged with a specific tag.
     *
     * @param  string  $tag
     * @return View
     */
    public function tagged(string $tag): View
    {
        $bookmarks = Bookmark::whereHas('tags', function ($query) use ($tag) {
            $query->where('tag', $tag);
        })->latest()->with('tags')->withCount('tags')->paginate(10);

        return view('bookmarks.tagged', compact('bookmarks', 'tag'));
    }
}
{'fraction_non_alphanumeric': 0.15798319327731092, 'fraction_numerical': 0.004201680672268907, 'mean_word_length': 2.585843373493976, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4544894', 'n_tokens_mistral': 721, 'n_tokens_neox': 704, 'n_words': 157}