<commit_before><?php

namespace App\Http\Middleware;

use Closure;
use App\Http\Controllers\User\LoginController;

class AuthenticateUser
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if(LoginController::isLoggedIn()){
            return $next($request);
        }else{
            redirect('/login');
        }
    }
}<commit_msg>Fix logic error<commit_after><?php

namespace App\Http\Middleware;

use Closure;
use App\Http\Controllers\User\LoginController;

class AuthenticateUser
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if(!LoginController::isLoggedIn()){
            return redirect('/login');
        }

        return $next($request);
    }
}
{'fraction_non_alphanumeric': 0.12475442043222004, 'fraction_numerical': 0.0, 'mean_word_length': 2.3300653594771243, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2875707', 'n_tokens_mistral': 312, 'n_tokens_neox': 313, 'n_words': 64}