Skip to content

PHP open/close tags inside CSS files are replaced with internal PHPCS token strings when auto fixing #2467

@dakanji

Description

@dakanji

PHP tokens are changed to program tokens but are not changed back when the appear in comment blocks

PHP version:

PHP 7.1.1 (cli) (built: Feb 13 2017 10:05:49) ( NTS )

PHP_CodeSniffer version:

PHP_CodeSniffer version 3.4.0 (stable) by Squiz (http://www.squiz.net)

Minimum samples of PHP code:

  • ... before running PHP_CodeSniffer:
/* <?php $varName = $ourClass->ourFunc('Some Test'); ?>
 * Some Txt
 */
  • ... with unexpected changes applied when running PHP_CodeSniffer:
/* ^PHPCS_CSS_T_OPEN_TAG^ $varName = $ourClass->ourFunc('Some Test'); ^PHPCS_CSS_T_CLOSE_TAG^
 * Some Txt
 */
  • .... with the changes expected:
// No Change

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions