<commit_before><?php namespace App\Http\Middleware;

use Closure;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
use Illuminate\Http\Request;

/**
 * Middleware to prevent CSRF
 */
class VerifyCsrfToken extends BaseVerifier
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle(Request $request, Closure $next)
    {
        if ($this->excludedRoutes($request)) {
            return $this->addCookieToResponse($request, $next($request));
        }

        return parent::handle($request, $next);
    }

    /**
     * Determines whether or not the request should be excluded from CSRF protection
     *
     * @param \Illuminate\Http\Request $request
     * @return boolean
     */
    protected function excludedRoutes(Request $request)
    {
        $routes = [
            'deploy/*'
        ];

        foreach ($routes as $route) {
            if ($request->is($route)) {
                return true;
            }
        }

        return false;
    }
}
<commit_msg>Removing a typehinting which causes failure<commit_after><?php namespace App\Http\Middleware;

use Closure;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
use Illuminate\Http\Request;

/**
 * Middleware to prevent CSRF
 */
class VerifyCsrfToken extends BaseVerifier
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if ($this->excludedRoutes($request)) {
            return $this->addCookieToResponse($request, $next($request));
        }

        return parent::handle($request, $next);
    }

    /**
     * Determines whether or not the request should be excluded from CSRF protection
     *
     * @param \Illuminate\Http\Request $request
     * @return boolean
     */
    protected function excludedRoutes(Request $request)
    {
        $routes = [
            'deploy/*'
        ];

        foreach ($routes as $route) {
            if ($request->is($route)) {
                return true;
            }
        }

        return false;
    }
}

{'fraction_non_alphanumeric': 0.11236933797909408, 'fraction_numerical': 0.0, 'mean_word_length': 2.150891632373114, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6256728', 'n_tokens_mistral': 655, 'n_tokens_neox': 662, 'n_words': 160}