<?php

namespace AutoAdmin\Bundle\Seo\EventListener\Traits;

use Symfony\Component\HttpFoundation\Request;

trait IsNotFrontUrlTrait
{
    protected function isNotFrontUrl(Request $request)
    {
        $route = $request->get('_route');
        if (
            $route === null
            || str_starts_with($route, '_')
            || str_starts_with($request->getUri(), '/admin/')
        ) {
            return false;
        }
    }
}
