While attempting to move more full stack within my company I notice with quite regularity the use of open/close tags that are not separated with non-php code. Looking at the PSR standards I can't find anything related to this. I do understand that there is no performance issue with this method, as syntax generally will not affect page performance.
Example
<?php echo $this->getChildHtml('stock.notifications') ?>
<?php echo $this->getChildHtml('tierprices') ?>
<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
<?php echo $this->getChildHtml('extrahint') ?>
Would this still be considered a correct/readable pattern or when I come across patterns such as this should I look to refactor as such:
Refactor Example
<?php
echo $this->getChildHtml('stock.notifications');
echo $this->getChildHtml('tierprices');
echo $this->getReviewsSummaryHtml($_product, false, true);
echo $this->getChildHtml('extrahint') ;
?>
Aucun commentaire:
Enregistrer un commentaire