Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
See: https://www.drupal.org/docs/develop/standards/coding-standards#controlst...
In templates, the alternate control statement syntax using : instead of brackets is allowed. Note that there should not be a space between the closing parenthesis after the control keyword, and the colon, and HTML/PHP inside the control structure should be indented. For example:
Emphasis is mine.
Right now phpcs does not distinguish between
<?php if (TRUE): ?>
and
<?php if (TRUE) : ?>
Comments