25 code style errors in a 20 line module. A new record?

dman - June 3, 2008 - 04:02
Project:Cluetip
Version:5.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs review
Description

... just joking. Half of them were just tabs :-)
Anyway, here's what it SHOULD look like to get through code review, although I haven't even started adjusting functionality yet.

<?php
<?php
// $Id: cluetip.module,v 1.1 2007/12/31 22:10:59 stompeers Exp $

function cluetip_load($file) {
  static
$cluetip_added;
  static
$cluetip_files;
  if (
$cluetip_added != 1) {
   
$cluetip_dir = drupal_get_path('module', 'cluetip') .'/cluetip/';
   
drupal_add_js($cluetip_dir .'jquery.dimensions.js');
   
drupal_add_js($cluetip_dir .'jquery.hoverIntent.js');
   
drupal_add_js($cluetip_dir .'jquery.cluetip.js');
   
drupal_add_css($cluetip_dir .'jquery.cluetip.css');
   
$cluetip_added = 1;
  }
  if (!
$cluetip_files[$file]) {
   
drupal_add_js($file);
   
$cluetip_files[$file] = TRUE;
  }
  return
$file;
}
?>

(and no closing php tag :-)
Thus, the patch is bigger than the module...

AttachmentSize
cluetip-coding_standards.patch1.51 KB

#1

Flying Drupalist - August 30, 2008 - 20:01

Thanks, :P Hope for a commit.

#2

a_c_m - February 10, 2009 - 09:29

The new D6 version has been run though coder and is fully compliant ! Dev build should be available in the next few hours.

 
 

Drupal is a registered trademark of Dries Buytaert.