phpcbf breaks wrong multi line @param comments (they shouldn't be flatten)

Created on 1 November 2015, over 9 years ago
Updated 31 May 2024, 10 months ago

The following code (PCA module, dev):

function postcodeanywhere_index_page() {
  /*
  $output = theme('advanced_help_topic', array(
    'module' => 'help_example',
    'topic' => 'about-php',
  ));
  */

has been converted into:

function postcodeanywhere_index_page() {
  /*
  $output = theme('advanced_help_topic', array(
  'module' => 'help_example',
  'topic' => 'about-php',
  ));
   */

For this particular example isn't much trouble, but for more complex code, it isn't much convenient.

Another example.

This code:

  /*
   * Set custom fields for PayPoint hosted session.
   *
   *  @param
   *    $customFields array
   *      Mandatory: The array containing custom fields.
   *      Example:
   *        customFields {
   *          dataFieldOrTextFieldOrLabelField [ array
   *            {
   *              name string Mandatory
   *              value string
   *              transient boolean
   *            }
   *
   *          ]
   *
   *        }
   *

is converted into:

  /**
   * Set custom fields for PayPoint hosted session.
   *
   * @param
   * $customFields array
   * Mandatory: The array containing custom fields.
   * Example:
   * customFields {
   * dataFieldOrTextFieldOrLabelField [ array
   * {
   * name string Mandatory
   * value string
   * transient boolean
   * }
   *
   * ]
   *
   * }
   */

This code:

  /*
   * Set skin for PayPoint hosted session.
   * The skin used to drive look and feed for this session.
   * @todo: Needs testing if works.
   *
   *  @param
   *    $skin string
   *      The ID of the skin used to drive look and feed for this session.
   *      Refer to Customise hosted look and feel for more information.
   */

into:

  /**
   * Set skin for PayPoint hosted session.
   * The skin used to drive look and feed for this session.
   *
   * @todo: Needs testing if works.
   *
   * @param
   * $skin string
   * The ID of the skin used to drive look and feed for this session.
   * Refer to Customise hosted look and feel for more information.
   */

  function setSessionSkin($skin) {
    $this->features['skin'] = $skin;
  }
🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Coder Review

Created by

🇬🇧United Kingdom kenorb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024