<commit_before><?php

namespace App\Http\Controllers;

use App\Http\Requests\Course\CreateRequest;
use App\Repositories\Contracts\LessonRepositoryInterface;
use App\Repositories\Contracts\UserRepositoryInterface;
use App\Repositories\Contracts\CourseRepositoryInterface;
use App\Traits\Authorizable;
use App\Usescases\Courses\Contracts\CreateCourseUsescaseInterface;
use App\Usescases\Courses\Contracts\DeleteCourseUsecaseInterface;
use App\Usescases\Courses\Contracts\ListCourseUsecaseInterface;
use App\Usescases\Courses\Contracts\ListLessonUsecaseInterface;
use App\Usescases\Courses\Contracts\UpdateCourseUsecaseInterface;
use App\Usescases\Courses\CreateCourseUsecase;
use App\Usescases\Courses\UpdateCourseUsecase;
use App\Usescases\Courses\DeleteCourseUsecase;
use Illuminate\Http\Request;

class CourseController extends Controller
{

    use Authorizable;

    public function __construct()
    {
        return $this->middleware('auth');
    }


    public function index(ListCourseUsecaseInterface $listCourseUsecase)
    {
        $courses = $listCourseUsecase->handle();
        return view('courses.index', compact('courses'));
    }

    public function show($id, ListLessonUsecaseInterface $listLessonUsecase, CourseRepositoryInterface $courseRepository)
    {
        $lessons = $listLessonUsecase->handle();
        $course = $courseRepository->findById($id);
        return view('courses.show', compact('lessons', 'course'));
    }

    public function create(UserRepositoryInterface $userRepository)<commit_msg>fix namespace list lessons<commit_after><?php

namespace App\Http\Controllers;

use App\Http\Requests\Course\CreateRequest;
use App\Repositories\Contracts\UserRepositoryInterface;
use App\Repositories\Contracts\CourseRepositoryInterface;
use App\Traits\Authorizable;
use App\Usescases\Courses\Contracts\CreateCourseUsescaseInterface;
use App\Usescases\Courses\Contracts\DeleteCourseUsecaseInterface;
use App\Usescases\Courses\Contracts\ListCourseUsecaseInterface;
use App\Usescases\Lessons\Contracts\ListLessonUsecaseInterface;
use App\Usescases\Courses\Contracts\UpdateCourseUsecaseInterface;

class CourseController extends Controller
{

    use Authorizable;

    public function __construct()
    {
        return $this->middleware('auth');
    }


    public function index(ListCourseUsecaseInterface $listCourseUsecase)
    {
        $courses = $listCourseUsecase->handle();
        return view('courses.index', compact('courses'));
    }

    public function show($id, ListLessonUsecaseInterface $listLessonUsecase, CourseRepositoryInterface $courseRepository)
    {
        $lessons = $listLessonUsecase->handle();
        $course = $courseRepository->findById($id);
        return view('courses.show', compact('lessons', 'course'));
    }

    public function create(UserRepositoryInterface $userRepository)
{'fraction_non_alphanumeric': 0.09799789251844046, 'fraction_numerical': 0.0, 'mean_word_length': 5.357142857142857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '4428206', 'n_tokens_mistral': 829, 'n_tokens_neox': 825, 'n_words': 132}