fix gitlab tests
This commit is contained in:
@@ -12,11 +12,13 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class EnsureSchoolYearEditable
|
||||
{
|
||||
public function __construct(private SchoolYearWriteGuard $guard) {}
|
||||
public function __construct(private SchoolYearWriteGuard $guard)
|
||||
{
|
||||
}
|
||||
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if (! in_array(strtoupper($request->method()), ['POST', 'PUT', 'PATCH', 'DELETE'], true)) {
|
||||
if (!in_array(strtoupper($request->method()), ['POST', 'PUT', 'PATCH', 'DELETE'], true)) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
@@ -82,7 +84,7 @@ class EnsureSchoolYearEditable
|
||||
|
||||
private function lookupYear(string $id, string $table, string $column): ?string
|
||||
{
|
||||
if (! ctype_digit($id) || ! DB::getSchemaBuilder()->hasTable($table)) {
|
||||
if (!ctype_digit($id) || !DB::getSchemaBuilder()->hasTable($table)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user