PrestaShop / hummingbird

77 stars 73 forks source link

Replace "else if" smarty conditions by "elseif" as officially recommanded #604

Closed Klemart3D closed 4 months ago

Klemart3D commented 4 months ago

Prerequisites

Describe the bug and add attachments

As recommended by Smarty official documentation an "else-if" condition must be write {elseif} (without space between else and if).

But currently, an else if syntax (with a space between else and if) is currently used:

In comparison, elseif syntax (without space between else and if) is currently used:

Not checked into every Smarty template files (modules, other themes…)

Expected behavior

A uniform smarty else-if syntax following official recommendation everywhere (in each smarty template ".tpl" files of the whole project).

Steps to reproduce

  1. Search for "{else if" in Classic theme codebase

PrestaShop version(s) where the bug happened

1.7.x, 8.x

PHP version(s) where the bug happened

8.1

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

No response

AureRita commented 4 months ago

Hi @Klemart3D

Thank you for your report. Currently you seems to show a feature to add in Prestashop instead of a real issue, If you're agree with that, I can change this issue into a discussion to discuss with the tech-council and product-council

Waiting for your feedback

Klemart3D commented 4 months ago

Hi @AureRita,

It's not a feature, it's a refactoring issue to have a more clean code, it's an issue for developers like me because some IDE like phpStorm showing it as an error (because of wrong smarty syntax used):

phpstorm

It can take less than one minute to fix that for team working on native PrestaShop themes, but if you prefer, I can open issue into hummingbird repository?

MatShir commented 4 months ago

Let's transfer into hummingbird repo ! If you are willing to contribute, we would be happy to review your work 🤗

Klemart3D commented 4 months ago

Hi @MatShir , thank you. I made 2 pull requests :

SharakPL commented 4 months ago

Fixed