Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-1757

"<?php" and "<?=" tags should be used

    XMLWordPrintable

    Details

    • Type: Code Smell Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Change this opening tag to either "<?php" or "<?=".
    • Highlighting:
      • primary: first NC tag
      • secondary: subsequent NC tags
        • message: none
    • Default Severity:
      Minor
    • Impact:
      Low
    • Likelihood:
      Low
    • Default Quality Profiles:
      Drupal, PSR-2
    • Covered Languages:
      PHP
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      2min

      Description

      Coding conventions allow teams to collaborate effectively. For maximum standardization and readability, PHP code should use the long <?php ?> tags or the short-echo <?= ?> tags; it should not use the other tag variations.

      Noncompliant Code Example

      <?
      $foo = 1;
      ?>
      

      Compliant Solution

      <?php
      $foo = 1;
      ?>
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ann.campbell.2 Ann Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: