Skip to content

Commit 027bc13

Browse files
committed
Rename function
1 parent 4c596c0 commit 027bc13

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/funcs/main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function file_read(string $path): string
1616
return $contents;
1717
}
1818

19-
function html_contains_html_tag(string $html): bool
19+
function html_contains_full_html(string $html): bool
2020
{
2121
return stripos($html, '<html') !== false || stripos($html, '<!doctype html>') !== false;
2222
}

src/routing/PhpRouteHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Symfony\Component\HttpFoundation\Request;
88
use Symfony\Component\HttpFoundation\Response;
99

10-
use function tebe\zack\html_contains_html_tag;
10+
use function tebe\zack\html_contains_full_html;
1111
use function tebe\zack\html_extract_layout;
1212
use function tebe\zack\html_extract_title;
1313

@@ -33,7 +33,7 @@ public function __invoke(Request $request): Response
3333
$outputValue = ob_get_clean();
3434

3535
if ($returnValue === 1 && is_string($outputValue)) {
36-
if (html_contains_html_tag($outputValue)) {
36+
if (html_contains_full_html($outputValue)) {
3737
return new Response($outputValue, 200);
3838
} else {
3939
$layout = html_extract_layout($outputValue);

0 commit comments

Comments
 (0)