I have followed html markup with php code:
<div class="block">
<div class="block-title">
<?php if ($user->isOnline()): ?>
<a href="<?=Url::create('/user/logout');?>">Logout</a>
<?php endif; ?>
</div>
</div>
When I run code sniffer, I get following errors:
<error line="3" column="15" severity="error" message="Line indented incorrectly; expected 8 spaces, found 0" source="Generic.WhiteSpace.ScopeIndent.Incorrect"/>
<error line="5" column="15" severity="error" message="Closing brace must be on a line by itself" source="PEAR.WhiteSpace.ScopeClosingBrace.Line"/>
I've tried to find any standards or descriptions about php constructions in html views, but nothing about it's.
Maybe, anybody knows how should looks if
and foreach
instructions in html?
Thanks.