From 577afc98a5a615a920b7932bf5181ff42f41625d Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Thu, 30 Apr 2015 11:54:33 -0500 Subject: [PATCH] Minor - Code conventions - refs #7611 --- composer.json | 4 ++-- main/exercice/MatchingDraggable.php | 2 +- main/exercice/answer.class.php | 2 +- main/inc/lib/display.lib.php | 21 +++++++++++---------- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 6552d58b35..96670edc65 100755 --- a/composer.json +++ b/composer.json @@ -53,7 +53,7 @@ "symfony/validator": "2.6.4", "gedmo/doctrine-extensions": "~2.3", "sonata-project/user-bundle": "~2.2", - "ramsey/array_column": "~1.1", + "ramsey/array_column": "~1.1", "patchwork/utf8": "~1.2", "ddeboer/data-import": "@stable", "phpoffice/phpexcel": "~1.8", @@ -70,7 +70,7 @@ "bower-asset/mediaelement": "@stable", "bower-asset/modernizr": "2.8.*", "bower-asset/jqueryui-timepicker-addon": "@stable", - "bower-asset/imageMap-resizer": "0.5.3" + "bower-asset/imageMap-resizer": "0.5.3" }, "require-dev": { "behat/behat": "2.5.*@stable", diff --git a/main/exercice/MatchingDraggable.php b/main/exercice/MatchingDraggable.php index d7ea2b6a85..91f9e0afd8 100644 --- a/main/exercice/MatchingDraggable.php +++ b/main/exercice/MatchingDraggable.php @@ -204,7 +204,7 @@ class MatchingDraggable extends Question } /** - * + * Process the creation of answers * @param type $form */ public function processAnswersCreation($form) diff --git a/main/exercice/answer.class.php b/main/exercice/answer.class.php index 7777e2595f..e05ae17bce 100755 --- a/main/exercice/answer.class.php +++ b/main/exercice/answer.class.php @@ -761,7 +761,7 @@ class Answer } /** - * Get the necessary JavaScript for some ansers + * Get the necessary JavaScript for some answers * @return string */ public function getJs() { diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 300db8a1a4..efb61156f7 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -946,17 +946,18 @@ class Display $extra_attributes = array(), $show_blank_item = true, $blank_item_text = null - ) { + ) + { $html = ''; $extra = ''; - $default_id = 'id="'.$name.'" '; - foreach($extra_attributes as $key=>$parameter) { + $default_id = 'id="' . $name . '" '; + foreach ($extra_attributes as $key => $parameter) { if ($key == 'id') { $default_id = ''; } - $extra .= $key.'="'.$parameter.'" '; + $extra .= $key . '="' . $parameter . '" '; } - $html .= ''; if ($show_blank_item) { if (empty($blank_item_text)) { @@ -964,17 +965,17 @@ class Display } else { $blank_item_text = Security::remove_XSS($blank_item_text); } - $html .= self::tag('option', '-- '.$blank_item_text.' --', array('value'=>'-1')); + $html .= self::tag('option', '-- ' . $blank_item_text . ' --', array('value' => '-1')); } if ($values) { foreach ($values as $key => $value) { - if(is_array($value) && isset($value['name'])) { + if (is_array($value) && isset($value['name'])) { $value = $value['name']; } - $html .= ''; } } $html .= '';