Линтовка

This commit is contained in:
2026-01-03 01:12:18 +08:00
parent ddc4374dd6
commit aabad9d744
20 changed files with 224 additions and 190 deletions

View File

@@ -1,4 +1,5 @@
<?php
/*
* Copyright (c) 2025, Антон Аксенов
* This file is part of m3u.su project
@@ -56,6 +57,7 @@ class BasicController
$json = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
$response->getBody()->write($json);
return $response->withStatus($status)
->withHeader('Content-Type', 'application/json');
}
@@ -99,6 +101,7 @@ class BasicController
array $data = [],
): ResponseInterface {
$view = Twig::fromRequest($request);
return $view->render($response, $template, $data);
}
}