User tests: Successful: Unsuccessful:
Labels |
Added:
?
|
Category | ⇒ | Code style |
@javigomez Can you comment on the code style please
Status | Pending | ⇒ | Needs Review |
@javigomez waiting on you to comment before this can be either closed or moved forward
hmm for my personal view we should use
<?php if (whatever) : ?>
<?php // Do what ever you want to do ?>
<?php endif; ?>
It is most smaler code and easier to read in views. As there should be majority HTML Code. ;) For models and other stuff like classes etc. I agree with:
<?php if (whatever)
{
// Do what ever you want to do
}
In the last time we merge a lot of the first type of code. But the PLT needs to take that if we want to change all the files again
In layout files, we use
<?php if (whatever) : ?>
<?php // Do what ever you want to do ?>
<?php endif; ?>`
Except in the first PHP block at the very beginning of the file. There we usually use
<?php if (whatever)
{
// Do what ever you want to do
}
Reason is that the first variant is supposed to be easier to understand by frontend guys and regular users. You can also easier move blocks around without creating fatal errors due to missing <?php ... ?> tags and the like.
So this PR doesn't follow our codestyle for the most part.
I'm closing it.
Status | Needs Review | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-06-16 19:53:12 |
Closed_By | ⇒ | Bakual |
I don't think this Code Style PR is in line with the general Joomla Coding Standards.