Passed
Branch develop (92bdcd)
by Laurent
32:39
created
htdocs/core/modules/modDocumentGeneration.class.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,11 +100,11 @@
 block discarded – undo
100 100
 	 *  The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
101 101
 	 *  It also creates data directories
102 102
 	 *
103
-     *  @param      string  $options    Options when enabling module ('', 'noboxes')
104
-     *  @return     int                 1 if OK, 0 if KO
105
-     */
106
-    public function init($options = '')
107
-    {
103
+	 *  @param      string  $options    Options when enabling module ('', 'noboxes')
104
+	 *  @return     int                 1 if OK, 0 if KO
105
+	 */
106
+	public function init($options = '')
107
+	{
108 108
 		global $conf;
109 109
 
110 110
 		// Permissions
Please login to merge, or discard this patch.
htdocs/core/modules/security/generate/modGeneratePassStandard.class.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 	public $length;
40 40
 
41 41
 	/**
42
-     * @var DoliDB Database handler.
43
-     */
44
-    public $db;
42
+	 * @var DoliDB Database handler.
43
+	 */
44
+	public $db;
45 45
 
46 46
 	public $conf;
47 47
 	public $lang;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	/**
71 71
 	 *		Return description of module
72 72
 	 *
73
- 	 *      @return     string      Description of module
73
+	 *      @return     string      Description of module
74 74
 	 */
75 75
 	public function getDescription()
76 76
 	{
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	/**
82 82
 	 * 		Return an example of password generated by this module
83 83
 	 *
84
- 	 *      @return     string      Example of password
84
+	 *      @return     string      Example of password
85 85
 	 */
86 86
 	public function getExample()
87 87
 	{
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	/**
92 92
 	 * 		Build new password
93 93
 	 *
94
- 	 *      @return     string      Return a new generated password
94
+	 *      @return     string      Return a new generated password
95 95
 	 */
96 96
 	public function getNewGeneratedPassword()
97 97
 	{
@@ -123,15 +123,15 @@  discard block
 block discarded – undo
123 123
 		return $password;
124 124
 	}
125 125
 
126
-    /**
127
-     *  Validate a password
128
-     *
129
-     *  @param      string  $password   Password to check
130
-     *  @return     int                 0 if KO, >0 if OK
131
-     */
132
-    public function validatePassword($password)
133
-    {
134
-        if (dol_strlen($password) < $this->length) return 0;
135
-        return 1;
136
-    }
126
+	/**
127
+	 *  Validate a password
128
+	 *
129
+	 *  @param      string  $password   Password to check
130
+	 *  @return     int                 0 if KO, >0 if OK
131
+	 */
132
+	public function validatePassword($password)
133
+	{
134
+		if (dol_strlen($password) < $this->length) return 0;
135
+		return 1;
136
+	}
137 137
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,9 @@
 block discarded – undo
131 131
      */
132 132
     public function validatePassword($password)
133 133
     {
134
-        if (dol_strlen($password) < $this->length) return 0;
134
+        if (dol_strlen($password) < $this->length) {
135
+        	return 0;
136
+        }
135 137
         return 1;
136 138
     }
137 139
 }
Please login to merge, or discard this patch.
htdocs/core/modules/security/generate/modGeneratePassNone.class.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 	public $length;
40 40
 
41 41
 	/**
42
-     * @var DoliDB Database handler.
43
-     */
44
-    public $db;
42
+	 * @var DoliDB Database handler.
43
+	 */
44
+	public $db;
45 45
 
46 46
 	public $conf;
47 47
 	public $lang;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	/**
71 71
 	 *		Return description of module
72 72
 	 *
73
- 	 *      @return     string      Description of text
73
+	 *      @return     string      Description of text
74 74
 	 */
75 75
 	public function getDescription()
76 76
 	{
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	/**
82 82
 	 * 		Return an example of password generated by this module
83 83
 	 *
84
- 	 *      @return     string      Example of password
84
+	 *      @return     string      Example of password
85 85
 	 */
86 86
 	public function getExample()
87 87
 	{
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	/**
92 92
 	 * 		Build new password
93 93
 	 *
94
- 	 *      @return     string      Return a new generated password
94
+	 *      @return     string      Return a new generated password
95 95
 	 */
96 96
 	public function getNewGeneratedPassword()
97 97
 	{
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 * 		Validate a password
103 103
 	 *
104 104
 	 *		@param		string	$password	Password to check
105
- 	 *      @return     int					0 if KO, >0 if OK
105
+	 *      @return     int					0 if KO, >0 if OK
106 106
 	 */
107 107
 	public function validatePassword($password)
108 108
 	{
Please login to merge, or discard this patch.
htdocs/core/triggers/dolibarrtriggers.class.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 	 *
81 81
 	 * @param DoliDB $db Database handler
82 82
 	 */
83
-    public function __construct(DoliDB $db)
84
-    {
83
+	public function __construct(DoliDB $db)
84
+	{
85 85
 
86 86
 		$this->db = $db;
87 87
 
@@ -134,16 +134,16 @@  discard block
 block discarded – undo
134 134
 		}
135 135
 	}
136 136
 
137
-    /**
138
-     *  Function called when a Dolibarrr business event is done.
139
-     *  All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
140
-     *
141
-     *  @param string       $action     Event action code
142
-     *  @param Object       $object     Object
143
-     *  @param User         $user       Object user
144
-     *  @param Translate    $langs      Object langs
145
-     *  @param conf         $conf       Object conf
146
-     *  @return int                     <0 if KO, 0 if no triggered ran, >0 if OK
147
-     */
148
-    public abstract function runTrigger($action, $object, User $user, Translate $langs, Conf $conf);
137
+	/**
138
+	 *  Function called when a Dolibarrr business event is done.
139
+	 *  All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
140
+	 *
141
+	 *  @param string       $action     Event action code
142
+	 *  @param Object       $object     Object
143
+	 *  @param User         $user       Object user
144
+	 *  @param Translate    $langs      Object langs
145
+	 *  @param conf         $conf       Object conf
146
+	 *  @return int                     <0 if KO, 0 if no triggered ran, >0 if OK
147
+	 */
148
+	public abstract function runTrigger($action, $object, User $user, Translate $langs, Conf $conf);
149 149
 }
Please login to merge, or discard this patch.
htdocs/core/modules/payment/modules_payment.php 1 patch
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -143,10 +143,16 @@
 block discarded – undo
143 143
 		global $langs;
144 144
 		$langs->load("admin");
145 145
 
146
-		if ($this->version == 'development') return $langs->trans("VersionDevelopment");
147
-		elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
148
-		elseif ($this->version == 'dolibarr') return DOL_VERSION;
149
-		elseif ($this->version) return $this->version;
150
-		else return $langs->trans("NotAvailable");
146
+		if ($this->version == 'development') {
147
+			return $langs->trans("VersionDevelopment");
148
+		} elseif ($this->version == 'experimental') {
149
+			return $langs->trans("VersionExperimental");
150
+		} elseif ($this->version == 'dolibarr') {
151
+			return DOL_VERSION;
152
+		} elseif ($this->version) {
153
+			return $this->version;
154
+		} else {
155
+			return $langs->trans("NotAvailable");
156
+		}
151 157
 	}
152 158
 }
Please login to merge, or discard this patch.
htdocs/core/modules/bom/modules_bom.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,10 +92,18 @@
 block discarded – undo
92 92
 		global $langs;
93 93
 		$langs->load("admin");
94 94
 
95
-		if ($this->version == 'development') return $langs->trans("VersionDevelopment");
96
-		if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
97
-		if ($this->version == 'dolibarr') return DOL_VERSION;
98
-		if ($this->version) return $this->version;
95
+		if ($this->version == 'development') {
96
+			return $langs->trans("VersionDevelopment");
97
+		}
98
+		if ($this->version == 'experimental') {
99
+			return $langs->trans("VersionExperimental");
100
+		}
101
+		if ($this->version == 'dolibarr') {
102
+			return DOL_VERSION;
103
+		}
104
+		if ($this->version) {
105
+			return $this->version;
106
+		}
99 107
 		return $langs->trans("NotAvailable");
100 108
 	}
101 109
 }
Please login to merge, or discard this patch.
htdocs/core/modules/modLoan.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
 	 *  The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
147 147
 	 *  It also creates data directories
148 148
 	 *
149
-     *  @param      string	$options    Options when enabling module ('', 'noboxes')
149
+	 *  @param      string	$options    Options when enabling module ('', 'noboxes')
150 150
 	 *  @return     int             	1 if OK, 0 if KO
151 151
 	 */
152 152
 	public function init($options = '')
Please login to merge, or discard this patch.
htdocs/core/modules/holiday/modules_holiday.php 2 patches
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -143,10 +143,16 @@
 block discarded – undo
143 143
 		global $langs;
144 144
 		$langs->load("admin");
145 145
 
146
-		if ($this->version == 'development') return $langs->trans("VersionDevelopment");
147
-		elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
148
-		elseif ($this->version == 'dolibarr') return DOL_VERSION;
149
-		elseif ($this->version) return $this->version;
150
-		else return $langs->trans("NotAvailable");
146
+		if ($this->version == 'development') {
147
+			return $langs->trans("VersionDevelopment");
148
+		} elseif ($this->version == 'experimental') {
149
+			return $langs->trans("VersionExperimental");
150
+		} elseif ($this->version == 'dolibarr') {
151
+			return DOL_VERSION;
152
+		} elseif ($this->version) {
153
+			return $this->version;
154
+		} else {
155
+			return $langs->trans("NotAvailable");
156
+		}
151 157
 	}
152 158
 }
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,17 +44,17 @@
 block discarded – undo
44 44
 	public $error = '';
45 45
 
46 46
 
47
-    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
48
-    /**
47
+	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
48
+	/**
49 49
 	 *	Return list of active generation modules
50 50
 	 *
51
-     *  @param  DoliDB  $db     			Database handler
52
-     *  @param  integer	$maxfilenamelength  Max length of value to show
53
-     *  @return	array						List of templates
54
-     */
51
+	 *  @param  DoliDB  $db     			Database handler
52
+	 *  @param  integer	$maxfilenamelength  Max length of value to show
53
+	 *  @return	array						List of templates
54
+	 */
55 55
 	public static function liste_modeles($db, $maxfilenamelength = 0)
56 56
 	{
57
-        // phpcs:enable
57
+		// phpcs:enable
58 58
 		global $conf;
59 59
 
60 60
 		$type = 'holiday';
Please login to merge, or discard this patch.
htdocs/core/tpl/resource_view.tpl.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@
 block discarded – undo
39 39
 
40 40
 		if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid'))
41 41
 		{
42
-		    print '<div class="tagtr oddeven">';
43
-		    print '<input type="hidden" name="lineid" value="'.$linked_resource['rowid'].'" />';
44
-		    print '<input type="hidden" name="element" value="'.$element.'" />';
42
+			print '<div class="tagtr oddeven">';
43
+			print '<input type="hidden" name="lineid" value="'.$linked_resource['rowid'].'" />';
44
+			print '<input type="hidden" name="element" value="'.$element.'" />';
45 45
 			print '<input type="hidden" name="element_id" value="'.$element_id.'" />';
46 46
 
47 47
 			print '<div class="tagtd">'.$object_resource->getNomUrl(1).'</div>';
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
51 51
 			print '</div>';
52 52
 		} else {
53 53
 			$class = '';
54
-			if ($linked_resource['rowid'] == GETPOST('lineid'))
55
-				$class = 'highlight';
54
+			if ($linked_resource['rowid'] == GETPOST('lineid')) {
55
+							$class = 'highlight';
56
+			}
56 57
 
57 58
 			print '<div class="tagtr oddeven'.($class ? ' '.$class : '').'">';
58 59
 
Please login to merge, or discard this patch.