Passed
Push — 1.10.x ( 04397c...5e25f1 )
by Angel Fernando Quiroz
181:14 queued 130:00
created
main/inc/lib/formvalidator/Element/DateRangePicker.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 class DateRangePicker extends HTML_QuickForm_text
8 8
 {
9 9
     /**
10
-    * Constructor
11
-    */
10
+     * Constructor
11
+     */
12 12
     public function __construct($elementName = null, $elementLabel = null, $attributes = null)
13 13
     {
14 14
         if (!isset($attributes['id'])) {
@@ -144,10 +144,10 @@  discard block
 block discarded – undo
144 144
     }
145 145
 
146 146
     /**
147
-    * @param array $dates result of parseDateRange()
148
-    *
149
-    * @return bool
150
-    */
147
+     * @param array $dates result of parseDateRange()
148
+     *
149
+     * @return bool
150
+     */
151 151
     public function validateDates($dates, $format = null)
152 152
     {
153 153
         if (empty($dates['start']) || empty($dates['end'])) {
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/HtmlEditor.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,9 +74,9 @@
 block discarded – undo
74 74
             $styleCss = $this->editor->getConfigAttribute('style');
75 75
 
76 76
             if ($styleCss) {
77
-               $style = true;
77
+                $style = true;
78 78
             } else {
79
-               $style = false;
79
+                $style = false;
80 80
             }
81 81
 
82 82
             return $this->buildEditor($style);
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/DatePicker.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
     }
27 27
 
28 28
     /**
29
-    * HTML code to display this datepicker
29
+     * HTML code to display this datepicker
30 30
      *
31 31
      * @return string
32
-    */
32
+     */
33 33
     public function toHtml()
34 34
     {
35 35
         if ($this->_flagFrozen) {
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/Url.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * Url element
5
- *
6
- * Class Url
7
- */
4
+     * Url element
5
+     *
6
+     * Class Url
7
+     */
8 8
 class Url extends HTML_QuickForm_text
9 9
 {
10 10
 
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/SelectTheme.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@
 block discarded – undo
6 6
 */
7 7
 class SelectTheme extends HTML_QuickForm_select
8 8
 {
9
-	/**
10
-	 * Class constructor
11
-	 */
12
-	function SelectTheme($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
13
-		parent::__construct($elementName, $elementLabel, $options, $attributes);
14
-		// Get all languages
15
-		$themes = api_get_themes();
16
-		$this->_options = array();
17
-		$this->_values = array();
18
-		$this->addOption('--',''); // no theme select
19
-		for ($i=0; $i< count($themes[0]);$i++) {
20
-			$this->addOption($themes[1][$i],$themes[0][$i]);
21
-		}
22
-	}
9
+    /**
10
+     * Class constructor
11
+     */
12
+    function SelectTheme($elementName=null, $elementLabel=null, $options=null, $attributes=null) {
13
+        parent::__construct($elementName, $elementLabel, $options, $attributes);
14
+        // Get all languages
15
+        $themes = api_get_themes();
16
+        $this->_options = array();
17
+        $this->_values = array();
18
+        $this->addOption('--',''); // no theme select
19
+        for ($i=0; $i< count($themes[0]);$i++) {
20
+            $this->addOption($themes[1][$i],$themes[0][$i]);
21
+        }
22
+    }
23 23
 }
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/SelectLanguage.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -6,22 +6,22 @@
 block discarded – undo
6 6
 */
7 7
 class SelectLanguage extends HTML_QuickForm_select
8 8
 {
9
-	/**
10
-	 * Class constructor
11
-	 */
12
-	function SelectLanguage($elementName=null, $elementLabel=null, $options=null, $attributes=null)
13
-	{
14
-		parent::__construct($elementName, $elementLabel, $options, $attributes);
15
-		// Get all languages
16
-		$languages = api_get_languages();
17
-		$this->_options = array();
18
-		$this->_values = array();
19
-		foreach ($languages['name'] as $index => $name) {
20
-			if($languages['folder'][$index] == api_get_setting('platformLanguage')) {
21
-				$this->addOption($name,$languages['folder'][$index],array('selected'=>'selected'));
22
-			} else {
23
-				$this->addOption($name,$languages['folder'][$index]);
24
-			}
25
-		}
26
-	}
9
+    /**
10
+     * Class constructor
11
+     */
12
+    function SelectLanguage($elementName=null, $elementLabel=null, $options=null, $attributes=null)
13
+    {
14
+        parent::__construct($elementName, $elementLabel, $options, $attributes);
15
+        // Get all languages
16
+        $languages = api_get_languages();
17
+        $this->_options = array();
18
+        $this->_values = array();
19
+        foreach ($languages['name'] as $index => $name) {
20
+            if($languages['folder'][$index] == api_get_setting('platformLanguage')) {
21
+                $this->addOption($name,$languages['folder'][$index],array('selected'=>'selected'));
22
+            } else {
23
+                $this->addOption($name,$languages['folder'][$index]);
24
+            }
25
+        }
26
+    }
27 27
 }
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Rule/Date.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@
 block discarded – undo
7 7
  */
8 8
 class HTML_QuickForm_Rule_Date extends HTML_QuickForm_Rule
9 9
 {
10
-	/**
11
-	 * Check a date
12
-	 * @see HTML_QuickForm_Rule
13
-	 * @param string $date example 2014-04-30
10
+    /**
11
+     * Check a date
12
+     * @see HTML_QuickForm_Rule
13
+     * @param string $date example 2014-04-30
14 14
      * @param array $options
15 15
      *
16
-	 * @return boolean True if date is valid
17
-	 */
18
-	public function validate($date, $options)
19
-	{
16
+     * @return boolean True if date is valid
17
+     */
18
+    public function validate($date, $options)
19
+    {
20 20
         return api_is_valid_date($date, 'Y-m-d');
21
-	}
21
+    }
22 22
 }
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Rule/UsernameAvailable.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -6,24 +6,24 @@
 block discarded – undo
6 6
  */
7 7
 class HTML_QuickForm_Rule_UsernameAvailable extends HTML_QuickForm_Rule
8 8
 {
9
-	/**
10
-	 * Function to check if a username is available
11
-	 * @see HTML_QuickForm_Rule
12
-	 * @param string $username Wanted username
13
-	 * @param string $current_username
14
-	 * @return boolean True if username is available
15
-	 */
16
-	function validate($username, $current_username = null) {
17
-		$user_table = Database::get_main_table(TABLE_MAIN_USER);
9
+    /**
10
+     * Function to check if a username is available
11
+     * @see HTML_QuickForm_Rule
12
+     * @param string $username Wanted username
13
+     * @param string $current_username
14
+     * @return boolean True if username is available
15
+     */
16
+    function validate($username, $current_username = null) {
17
+        $user_table = Database::get_main_table(TABLE_MAIN_USER);
18 18
         $username = Database::escape_string($username);
19 19
         $current_username = Database::escape_string($current_username);
20 20
 
21
-		$sql = "SELECT * FROM $user_table WHERE username = '$username'";
22
-		if (!is_null($current_username)) {
23
-			$sql .= " AND username != '$current_username'";
24
-		}
25
-		$res = Database::query($sql);
26
-		$number = Database::num_rows($res);
27
-		return $number == 0;
28
-	}
21
+        $sql = "SELECT * FROM $user_table WHERE username = '$username'";
22
+        if (!is_null($current_username)) {
23
+            $sql .= " AND username != '$current_username'";
24
+        }
25
+        $res = Database::query($sql);
26
+        $number = Database::num_rows($res);
27
+        return $number == 0;
28
+    }
29 29
 }
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Rule/CompareDateTimeText.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      * @return boolean True if the 2 given dates match the operator
13 13
      */
14 14
     function validate($values, $operator = null) {
15
-    	$datetime1 = api_strtotime($values[0]);
15
+        $datetime1 = api_strtotime($values[0]);
16 16
         $datetime2 = api_strtotime($values[1]);
17 17
 
18 18
         if (strpos($operator, 'allow_empty') !== false) {
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
                 return true;
22 22
             }
23 23
         }
24
-		$result =  parent::validate(array($datetime1, $datetime2), $operator);
24
+        $result =  parent::validate(array($datetime1, $datetime2), $operator);
25 25
         return $result;
26 26
     }
27 27
 }
Please login to merge, or discard this patch.