plugin-php icon indicating copy to clipboard operation
plugin-php copied to clipboard

Comment not printed error because of echo shorthand

Open p0psicles opened this issue 1 year ago • 0 comments

@prettier/plugin-php v0.22.2 Playground link

Input:

<?php
/**
 * Tweakwise & Emico (https://www.tweakwise.com/ & https://www.emico.nl/) - All Rights Reserved
 *
 * @copyright Copyright (c) 2017-2017 Tweakwise.com B.V. (https://www.tweakwise.com)
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
?>

<script id="autocomplete-item-template" type="text/x-magento-template" data-url="<?= $block->getAjaxUrl() ?>">
</script>

<?php
    // phpcs:enable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
?>

Output:

Comment "// phpcs:enable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound" was not printed. Please report this error!

p0psicles avatar Jan 16 '25 11:01 p0psicles