Skip to content

Commit 0894cf1

Browse files
committed
Switch spaces with tabs in Listener.php
1 parent 7a3f9e4 commit 0894cf1

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

Listener.php

+28-28
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class Listener
2828
* @param AbstractReply $reply Reply object.
2929
* @param AbstractRenderer $renderer Renderer object.
3030
* @param Response $response HTTP Response object.
31-
*
32-
* @noinspection PhpUnusedParameterInspection
33-
*/
31+
*
32+
* @noinspection PhpUnusedParameterInspection
33+
*/
3434
public static function dispatcherPostRender(
3535
Dispatcher $dispatcher,
3636
?string &$content,
@@ -49,39 +49,39 @@ public static function dispatcherPostRender(
4949
{
5050
$permissionErrors = $templater->getPermissionErrors();
5151

52-
if (count($permissionErrors))
53-
{
54-
$warningHtml = '<div class="blockMessage blockMessage--warning"><h2 style="margin: 0 0 .5em 0">Permission errors</h2><ul>';
55-
foreach ($permissionErrors AS $permissionError)
56-
{
57-
$warningHtml .= sprintf('<li>%s (%s:%d)</li>',
58-
htmlspecialchars($permissionError['error']),
59-
htmlspecialchars(FileUtil::stripRootPathPrefix($permissionError['file'])),
60-
$permissionError['line']
61-
);
62-
}
63-
$warningHtml .= '</ul></div>';
52+
if (count($permissionErrors))
53+
{
54+
$warningHtml = '<div class="blockMessage blockMessage--warning"><h2 style="margin: 0 0 .5em 0">Permission errors</h2><ul>';
55+
foreach ($permissionErrors AS $permissionError)
56+
{
57+
$warningHtml .= sprintf('<li>%s (%s:%d)</li>',
58+
htmlspecialchars($permissionError['error']),
59+
htmlspecialchars(FileUtil::stripRootPathPrefix($permissionError['file'])),
60+
$permissionError['line']
61+
);
62+
}
63+
$warningHtml .= '</ul></div>';
6464

65-
if (strpos($content, '<!--XF:EXTRA_OUTPUT-->') !== false)
66-
{
67-
$content = str_replace('<!--XF:EXTRA_OUTPUT-->', $warningHtml . '<!--XF:EXTRA_OUTPUT-->', $content);
68-
}
69-
else
70-
{
71-
$content = preg_replace('#<body[^>]*>#i', "\\0$warningHtml", $content);
72-
}
73-
}
74-
}
75-
}
65+
if (strpos($content, '<!--XF:EXTRA_OUTPUT-->') !== false)
66+
{
67+
$content = str_replace('<!--XF:EXTRA_OUTPUT-->', $warningHtml . '<!--XF:EXTRA_OUTPUT-->', $content);
68+
}
69+
else
70+
{
71+
$content = preg_replace('#<body[^>]*>#i', "\\0$warningHtml", $content);
72+
}
73+
}
74+
}
75+
}
7676

7777

7878
/**
7979
* Called after the global \XF\App object has been setup. This will fire regardless of
8080
* the application type.
8181
*
8282
* @param BaseApp $app Global App object.
83-
*
84-
* @noinspection PhpUnusedParameterInspection
83+
*
84+
* @noinspection PhpUnusedParameterInspection
8585
*/
8686
public static function appSetup(BaseApp $app): void
8787
{

0 commit comments

Comments
 (0)