Change code style

This commit is contained in:
Art4 2025-01-29 08:53:49 +00:00 committed by Hypolite Petovan
parent d9a2d676d2
commit 70a6c6ed01

View file

@ -233,10 +233,9 @@ class Page implements ArrayAccess
$touch_icon = 'images/friendica-192.png'; $touch_icon = 'images/friendica-192.png';
} }
$this->page['htmlhead'] = $this->eventDispatcher->dispatch(new HtmlFilterEvent( $this->page['htmlhead'] = $this->eventDispatcher->dispatch(
HtmlFilterEvent::HEAD, new HtmlFilterEvent(HtmlFilterEvent::HEAD, $this->page['htmlhead'])
$this->page['htmlhead'] )->getHtml();
))->getHtml();
$tpl = Renderer::getMarkupTemplate('head.tpl'); $tpl = Renderer::getMarkupTemplate('head.tpl');
/* put the head template at the beginning of page['htmlhead'] /* put the head template at the beginning of page['htmlhead']
@ -358,10 +357,9 @@ class Page implements ArrayAccess
]); ]);
} }
$this->page['footer'] = $this->eventDispatcher->dispatch(new HtmlFilterEvent( $this->page['footer'] = $this->eventDispatcher->dispatch(
HtmlFilterEvent::FOOTER, new HtmlFilterEvent(HtmlFilterEvent::FOOTER, $this->page['footer'])
$this->page['footer'] )->getHtml();
))->getHtml();
$tpl = Renderer::getMarkupTemplate('footer.tpl'); $tpl = Renderer::getMarkupTemplate('footer.tpl');
$this->page['footer'] = Renderer::replaceMacros($tpl, [ $this->page['footer'] = Renderer::replaceMacros($tpl, [
@ -386,10 +384,9 @@ class Page implements ArrayAccess
{ {
// initialise content region // initialise content region
if ($mode->isNormal()) { if ($mode->isNormal()) {
$this->page['content'] = $this->eventDispatcher->dispatch(new HtmlFilterEvent( $this->page['content'] = $this->eventDispatcher->dispatch(
HtmlFilterEvent::PAGE_CONTENT_TOP, new HtmlFilterEvent(HtmlFilterEvent::PAGE_CONTENT_TOP, $this->page['content'])
$this->page['content'] )->getHtml();
))->getHtml();
} }
$this->page['content'] .= (string)$response->getBody(); $this->page['content'] .= (string)$response->getBody();
@ -487,10 +484,9 @@ class Page implements ArrayAccess
$profiler->set(microtime(true) - $timestamp, 'aftermath'); $profiler->set(microtime(true) - $timestamp, 'aftermath');
if (!$mode->isAjax()) { if (!$mode->isAjax()) {
$this->page['content'] = $this->eventDispatcher->dispatch(new HtmlFilterEvent( $this->page['content'] = $this->eventDispatcher->dispatch(
HtmlFilterEvent::PAGE_END, new HtmlFilterEvent(HtmlFilterEvent::PAGE_END, $this->page['content'])
$this->page['content'] )->getHtml();
))->getHtml();
} }
// Add the navigation (menu) template // Add the navigation (menu) template