Many coding standard errors

Created on 16 September 2014, almost 10 years ago
Updated 1 August 2023, 11 months ago

There are many coding standard violations which makes reviewing the code very hard.

http://pareview.sh/pareview/httpgitdrupalorgprojectdrupalchatgit refuses to run because there is a git tag that has the same name as the branch 7.x-1.x. Make sure to remove this tag to avoid confusion.

Coder Sniffer can be used to detect the coding standard errors.

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇦🇹Austria klausi 🇦🇹 Vienna

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

Comments & Activities

  • Status changed to Needs work about 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    +function drupalchat_app_settings()
    +{
    +    global $user;
    +
    +    if (isset($_SESSION['token']) && !empty($_SESSION['token'])) {
    +        $token = $_SESSION['token'];
    +    } else {
    +        $json = _drupalchat_get_auth(array());
    +        $token = $json['key'];
    +    }
    +
    +    $drupalchat_host = DRUPALCHAT_EXTERNAL_A_HOST;
    +    $host = explode("/", $drupalchat_host);
    +    $host_name = $host[2];
    +
    +    $dashboardUrl = "https://". DRUPALCHAT_EXTERNAL_CDN_HOST ."/apps/dashboard/#/settings/app?sessid=". $token ."&hostName=". $host_name ."&hostPort=". DRUPALCHAT_EXTERNAL_A_PORT;
    +    $form = array();
    +    $form['drupalchat_app_dashboard'] = array(
    +      '#type' => 'button',
    +      '#attributes' => array('onClick' => 'window.open("'.$dashboardUrl.'","_blank")'),
    +      '#value' => t('Click here to open App Dashboard'),
    +    );
    +
    +    return $form;
    +}

    Code must be formatted following the Drupal coding standards, for which the indentation is two spaces and the opening curly parenthesis must be in the same line containing the function declaration, among other things.

  • Issue was unassigned.
  • Status changed to Closed: won't fix 11 months ago
  • Status changed to Needs work 11 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • First commit to issue fork.
Production build 0.69.0 2024