package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -27,14 +27,11 @@ use Symfony\Component\HttpFoundation\Response;
*/
class Esi extends AbstractSurrogate
{
public function getName()
public function getName(): string
{
return 'esi';
}
/**
* {@inheritdoc}
*/
public function addSurrogateControl(Response $response)
{
if (str_contains($response->getContent(), '<esi:include')) {
@@ -42,10 +39,7 @@ class Esi extends AbstractSurrogate
}
}
/**
* {@inheritdoc}
*/
public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = '')
public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = ''): string
{
$html = sprintf('<esi:include src="%s"%s%s />',
$uri,
@@ -60,10 +54,7 @@ class Esi extends AbstractSurrogate
return $html;
}
/**
* {@inheritdoc}
*/
public function process(Request $request, Response $response)
public function process(Request $request, Response $response): Response
{
$type = $response->headers->get('Content-Type');
if (empty($type)) {