<commit_before><?php

namespace TypiCMS\Modules\Projects\Http\Controllers;

use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\View\View;
use TypiCMS\Modules\Core\Http\Controllers\BaseAdminController;
use TypiCMS\Modules\Projects\Http\Requests\FormRequest;
use TypiCMS\Modules\Projects\Models\Project;

class AdminController extends BaseAdminController
{
    public function index(): View
    {
        return view('projects::admin.index');
    }

    public function create(): View
    {
        $model = new Project();

        return view('projects::admin.create')
            ->with(compact('model'));
    }

    public function edit(Project $project): View
    {
        return view('projects::admin.edit')
            ->with([
                'model' => $project,
            ]);
    }

    public function store(FormRequest $request): RedirectResponse
    {
        $data = $request->validated();
        $project = Project::create($data);

        return $this->redirect($request, $project);
    }

    public function update(Project $project, FormRequest $request): RedirectResponse
    {
        $data = $request->validated();
        $project->update($data);

        return $this->redirect($request, $project);
    }

    public function files(Project $project): JsonResponse
    {
        $data = [
            'models' => $project->files,
        ];

        return response()->json($data, 200);
    }
}<commit_msg>$data removed<commit_after><?php

namespace TypiCMS\Modules\Projects\Http\Controllers;

use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\View\View;
use TypiCMS\Modules\Core\Http\Controllers\BaseAdminController;
use TypiCMS\Modules\Projects\Http\Requests\FormRequest;
use TypiCMS\Modules\Projects\Models\Project;

class AdminController extends BaseAdminController
{
    public function index(): View
    {
        return view('projects::admin.index');
    }

    public function create(): View
    {
        $model = new Project();

        return view('projects::admin.create')
            ->with(compact('model'));
    }

    public function edit(Project $project): View
    {
        return view('projects::admin.edit')
            ->with([
                'model' => $project,
            ]);
    }

    public function store(FormRequest $request): RedirectResponse
    {
        $project = Project::create($request->validated());

        return $this->redirect($request, $project);
    }

    public function update(Project $project, FormRequest $request): RedirectResponse
    {
        $project->update($request->validated());

        return $this->redirect($request, $project);
    }

    public function files(Project $project): JsonResponse
    {
        $data = [
            'models' => $project->files,
        ];

        return response()->json($data, 200);
    }
}
{'fraction_non_alphanumeric': 0.13210818307905686, 'fraction_numerical': 0.0020804438280166435, 'mean_word_length': 2.776178010471204, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '7046062', 'n_tokens_mistral': 801, 'n_tokens_neox': 792, 'n_words': 159}