Passed
Branch develop (92bdcd)
by Laurent
32:39
created
htdocs/core/modules/expensereport/modules_expensereport.php 2 patches
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -148,10 +148,16 @@
 block discarded – undo
148 148
         global $langs;
149 149
         $langs->load("admin");
150 150
 
151
-        if ($this->version == 'development') return $langs->trans("VersionDevelopment");
152
-        elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
153
-        elseif ($this->version == 'dolibarr') return DOL_VERSION;
154
-        elseif ($this->version) return $this->version;
155
-        else return $langs->trans("NotAvailable");
151
+        if ($this->version == 'development') {
152
+        	return $langs->trans("VersionDevelopment");
153
+        } elseif ($this->version == 'experimental') {
154
+        	return $langs->trans("VersionExperimental");
155
+        } elseif ($this->version == 'dolibarr') {
156
+        	return DOL_VERSION;
157
+        } elseif ($this->version) {
158
+        	return $this->version;
159
+        } else {
160
+        	return $langs->trans("NotAvailable");
161
+        }
156 162
     }
157 163
 }
Please login to merge, or discard this patch.
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -29,17 +29,17 @@  discard block
 block discarded – undo
29 29
 	public $error = '';
30 30
 
31 31
 
32
-    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
32
+	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
33 33
 	/**
34 34
 	 *  Return list of active models generation
35
-     *
36
-     *  @param	DoliDB	$db     			Database handler
37
-     *  @param  integer	$maxfilenamelength  Max length of value to show
38
-     *  @return	array						List of templates
39
-     */
35
+	 *
36
+	 *  @param	DoliDB	$db     			Database handler
37
+	 *  @param  integer	$maxfilenamelength  Max length of value to show
38
+	 *  @return	array						List of templates
39
+	 */
40 40
 	public static function liste_modeles($db, $maxfilenamelength = 0)
41 41
 	{
42
-        // phpcs:enable
42
+		// phpcs:enable
43 43
 		global $conf;
44 44
 
45 45
 		$type = 'expensereport';
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
  */
68 68
 function expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
69 69
 {
70
-    return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
70
+	return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
71 71
 }
72 72
 
73 73
 /**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 *
88 88
 	 *	@return		boolean     true if model can be used
89 89
 	 */
90
-    public function isEnabled()
90
+	public function isEnabled()
91 91
 	{
92 92
 		return true;
93 93
 	}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 *
98 98
 	 *	@return     string      Descriptive text
99 99
 	 */
100
-    public function info()
100
+	public function info()
101 101
 	{
102 102
 		global $langs;
103 103
 		$langs->load("orders");
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 *
110 110
 	 *	@return     string      Example
111 111
 	 */
112
-    public function getExample()
112
+	public function getExample()
113 113
 	{
114 114
 		global $langs;
115 115
 		$langs->load("trips");
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 *
122 122
 	 *	@return     boolean     false if conflict, true if ok
123 123
 	 */
124
-    public function canBeActivated()
124
+	public function canBeActivated()
125 125
 	{
126 126
 		return true;
127 127
 	}
@@ -132,26 +132,26 @@  discard block
 block discarded – undo
132 132
 	 *	@param	Object		$object		Object we need next value for
133 133
 	 *	@return	string      Value
134 134
 	 */
135
-    public function getNextValue($object)
135
+	public function getNextValue($object)
136 136
 	{
137 137
 		global $langs;
138 138
 		return $langs->trans("NotAvailable");
139 139
 	}
140 140
 
141
-    /**
142
-     *  Returns the version of the numbering module
143
-     *
144
-     *  @return     string      Value
145
-     */
146
-    public function getVersion()
147
-    {
148
-        global $langs;
149
-        $langs->load("admin");
150
-
151
-        if ($this->version == 'development') return $langs->trans("VersionDevelopment");
152
-        elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
153
-        elseif ($this->version == 'dolibarr') return DOL_VERSION;
154
-        elseif ($this->version) return $this->version;
155
-        else return $langs->trans("NotAvailable");
156
-    }
141
+	/**
142
+	 *  Returns the version of the numbering module
143
+	 *
144
+	 *  @return     string      Value
145
+	 */
146
+	public function getVersion()
147
+	{
148
+		global $langs;
149
+		$langs->load("admin");
150
+
151
+		if ($this->version == 'development') return $langs->trans("VersionDevelopment");
152
+		elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
153
+		elseif ($this->version == 'dolibarr') return DOL_VERSION;
154
+		elseif ($this->version) return $this->version;
155
+		else return $langs->trans("NotAvailable");
156
+	}
157 157
 }
Please login to merge, or discard this patch.
htdocs/core/modules/project/modules_project.php 2 patches
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,10 +140,16 @@
 block discarded – undo
140 140
 		global $langs;
141 141
 		$langs->load("admin");
142 142
 
143
-		if ($this->version == 'development') return $langs->trans("VersionDevelopment");
144
-		elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
145
-		elseif ($this->version == 'dolibarr') return DOL_VERSION;
146
-		elseif ($this->version) return $this->version;
147
-		else return $langs->trans("NotAvailable");
143
+		if ($this->version == 'development') {
144
+			return $langs->trans("VersionDevelopment");
145
+		} elseif ($this->version == 'experimental') {
146
+			return $langs->trans("VersionExperimental");
147
+		} elseif ($this->version == 'dolibarr') {
148
+			return DOL_VERSION;
149
+		} elseif ($this->version) {
150
+			return $this->version;
151
+		} else {
152
+			return $langs->trans("NotAvailable");
153
+		}
148 154
     }
149 155
 }
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
 	public $error = '';
38 38
 
39 39
 
40
-    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
41
-    /**
40
+	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
41
+	/**
42 42
 	 *  Return list of active generation modules
43 43
 	 *
44
-     *  @param  DoliDB	$db     			Database handler
45
-     *  @param  integer	$maxfilenamelength  Max length of value to show
46
-     *  @return	array						List of templates
47
-     */
48
-    public static function liste_modeles($db, $maxfilenamelength = 0)
44
+	 *  @param  DoliDB	$db     			Database handler
45
+	 *  @param  integer	$maxfilenamelength  Max length of value to show
46
+	 *  @return	array						List of templates
47
+	 */
48
+	public static function liste_modeles($db, $maxfilenamelength = 0)
49 49
 	{
50
-        // phpcs:enable
50
+		// phpcs:enable
51 51
 		global $conf;
52 52
 
53 53
 		$type = 'project';
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 *
78 78
 	 *  @return		boolean     true if module can be used
79 79
 	 */
80
-    public function isEnabled()
80
+	public function isEnabled()
81 81
 	{
82 82
 		return true;
83 83
 	}
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 *
88 88
 	 *  @return     string      Texte descripif
89 89
 	 */
90
-    public function info()
90
+	public function info()
91 91
 	{
92 92
 		global $langs;
93 93
 		$langs->load("projects");
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 *  @return     string      Example
101 101
 	 */
102
-    public function getExample()
102
+	public function getExample()
103 103
 	{
104 104
 		global $langs;
105 105
 		$langs->load("projects");
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	 *
113 113
 	 *  @return     boolean     false if conflict, true if ok
114 114
 	 */
115
-    public function canBeActivated()
115
+	public function canBeActivated()
116 116
 	{
117 117
 		return true;
118 118
 	}
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	 *	@param	Project		$project	Object project
125 125
 	 *	@return	string					Valeur
126 126
 	 */
127
-    public function getNextValue($objsoc, $project)
127
+	public function getNextValue($objsoc, $project)
128 128
 	{
129 129
 		global $langs;
130 130
 		return $langs->trans("NotAvailable");
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 	 *
136 136
 	 *  @return     string      Valeur
137 137
 	 */
138
-    public function getVersion()
139
-    {
138
+	public function getVersion()
139
+	{
140 140
 		global $langs;
141 141
 		$langs->load("admin");
142 142
 
@@ -145,5 +145,5 @@  discard block
 block discarded – undo
145 145
 		elseif ($this->version == 'dolibarr') return DOL_VERSION;
146 146
 		elseif ($this->version) return $this->version;
147 147
 		else return $langs->trans("NotAvailable");
148
-    }
148
+	}
149 149
 }
Please login to merge, or discard this patch.
htdocs/core/modules/modExternalRss.class.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	 *		The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
84 84
 	 *		It also creates data directories
85 85
 	 *
86
-     *      @param      string	$options    Options when enabling module ('', 'noboxes')
86
+	 *      @param      string	$options    Options when enabling module ('', 'noboxes')
87 87
 	 *      @return     int             	1 if OK, 0 if KO
88 88
 	 */
89 89
 	public function init($options = '')
@@ -118,21 +118,21 @@  discard block
 block discarded – undo
118 118
 		return $this->_init($sql, $options);
119 119
 	}
120 120
 
121
-    /**
121
+	/**
122 122
 	 *		Function called when module is disabled.
123 123
 	 *      Remove from database constants, boxes and permissions from Dolibarr database.
124 124
 	 *		Data directories are not deleted
125 125
 	 *
126
-     *      @param      string	$options    Options when enabling module ('', 'noboxes')
126
+	 *      @param      string	$options    Options when enabling module ('', 'noboxes')
127 127
 	 *      @return     int             	1 if OK, 0 if KO
128
-     */
129
-    public function remove($options = '')
130
-    {
128
+	 */
129
+	public function remove($options = '')
130
+	{
131 131
 		$sql = array();
132 132
 
133 133
 		// Delete old declarations of RSS box
134 134
 		$this->boxes[0]['file'] = "box_external_rss.php";
135 135
 
136 136
 		return $this->_remove($sql, $options);
137
-    }
137
+	}
138 138
 }
Please login to merge, or discard this patch.
htdocs/core/modules/modLabel.class.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,16 +97,16 @@
 block discarded – undo
97 97
 	 *		The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
98 98
 	 *		It also creates data directories
99 99
 	 *
100
-     *      @param      string	$options    Options when enabling module ('', 'noboxes')
100
+	 *      @param      string	$options    Options when enabling module ('', 'noboxes')
101 101
 	 *      @return     int             	1 if OK, 0 if KO
102 102
 	 */
103
-    public function init($options = '')
104
-    {
103
+	public function init($options = '')
104
+	{
105 105
 		// Permissions
106 106
 		$this->remove($options);
107 107
 
108 108
 		$sql = array();
109 109
 
110 110
 		return $this->_init($sql, $options);
111
-    }
111
+	}
112 112
 }
Please login to merge, or discard this patch.
htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php 2 patches
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -135,10 +135,18 @@
 block discarded – undo
135 135
 		global $langs;
136 136
 		$langs->load("admin");
137 137
 
138
-		if ($this->version == 'development') return $langs->trans("VersionDevelopment");
139
-		if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
140
-		if ($this->version == 'dolibarr') return DOL_VERSION;
141
-		if ($this->version) return $this->version;
138
+		if ($this->version == 'development') {
139
+			return $langs->trans("VersionDevelopment");
140
+		}
141
+		if ($this->version == 'experimental') {
142
+			return $langs->trans("VersionExperimental");
143
+		}
144
+		if ($this->version == 'dolibarr') {
145
+			return DOL_VERSION;
146
+		}
147
+		if ($this->version) {
148
+			return $this->version;
149
+		}
142 150
 		return $langs->trans("NotAvailable");
143 151
     }
144 152
 }
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
 	public $error = '';
41 41
 
42 42
 
43
-    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
43
+	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
44 44
 	/**
45 45
 	 *  Return list of active generation models
46 46
 	 *
47
-     *  @param	DoliDB	$db     			Database handler
48
-     *  @param  integer	$maxfilenamelength  Max length of value to show
49
-     *  @return	array						List of numbers
47
+	 *  @param	DoliDB	$db     			Database handler
48
+	 *  @param  integer	$maxfilenamelength  Max length of value to show
49
+	 *  @return	array						List of numbers
50 50
 	 */
51 51
 	public static function liste_modeles($db, $maxfilenamelength = 0)
52 52
 	{
53
-        // phpcs:enable
53
+		// phpcs:enable
54 54
 		global $conf;
55 55
 
56 56
 		$type = 'invoice_supplier';
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 *
78 78
 	 *   @return	boolean     true if model can be used
79 79
 	 */
80
-    public function isEnabled()
80
+	public function isEnabled()
81 81
 	{
82 82
 		return true;
83 83
 	}
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 *
87 87
 	 *   @return    string      Description Text
88 88
 	 */
89
-    public function info()
89
+	public function info()
90 90
 	{
91 91
 		global $langs;
92 92
 		$langs->load("invoices");
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 *
98 98
 	 *    @return   string      Example
99 99
 	 */
100
-    public function getExample()
100
+	public function getExample()
101 101
 	{
102 102
 		global $langs;
103 103
 		$langs->load("invoices");
@@ -108,30 +108,30 @@  discard block
 block discarded – undo
108 108
 	 *
109 109
 	 *   @return	boolean     false if conflict, true if ok
110 110
 	 */
111
-    public function canBeActivated()
111
+	public function canBeActivated()
112 112
 	{
113 113
 		return true;
114 114
 	}
115 115
 
116
-    /**  Returns next value assigned
117
-     *
118
-     * @param	Societe		$objsoc     Object third party
119
-     * @param  	Object	    $object		Object
120
-     * @param	string		$mode       'next' for next value or 'last' for last value
121
-     * @return 	string      			Value if OK, 0 if KO
122
-     */
123
-    public function getNextValue($objsoc, $object, $mode)
124
-    {
116
+	/**  Returns next value assigned
117
+	 *
118
+	 * @param	Societe		$objsoc     Object third party
119
+	 * @param  	Object	    $object		Object
120
+	 * @param	string		$mode       'next' for next value or 'last' for last value
121
+	 * @return 	string      			Value if OK, 0 if KO
122
+	 */
123
+	public function getNextValue($objsoc, $object, $mode)
124
+	{
125 125
 		global $langs;
126 126
 		return $langs->trans("NotAvailable");
127
-    }
127
+	}
128 128
 
129 129
 	/**   Returns version of the model numbering
130 130
 	 *
131 131
 	 *    @return     string      Value
132 132
 	 */
133
-    public function getVersion()
134
-    {
133
+	public function getVersion()
134
+	{
135 135
 		global $langs;
136 136
 		$langs->load("admin");
137 137
 
@@ -140,5 +140,5 @@  discard block
 block discarded – undo
140 140
 		if ($this->version == 'dolibarr') return DOL_VERSION;
141 141
 		if ($this->version) return $this->version;
142 142
 		return $langs->trans("NotAvailable");
143
-    }
143
+	}
144 144
 }
Please login to merge, or discard this patch.
htdocs/core/modules/reception/modules_reception.php 2 patches
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,10 +145,15 @@
 block discarded – undo
145 145
 		global $langs;
146 146
 		$langs->load("admin");
147 147
 
148
-		if ($this->version == 'development') return $langs->trans("VersionDevelopment");
149
-		elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
150
-		elseif ($this->version == 'dolibarr') return DOL_VERSION;
151
-		elseif ($this->version) return $this->version;
148
+		if ($this->version == 'development') {
149
+			return $langs->trans("VersionDevelopment");
150
+		} elseif ($this->version == 'experimental') {
151
+			return $langs->trans("VersionExperimental");
152
+		} elseif ($this->version == 'dolibarr') {
153
+			return DOL_VERSION;
154
+		} elseif ($this->version) {
155
+			return $this->version;
156
+		}
152 157
 		return $langs->trans("NotAvailable");
153 158
 	}
154 159
 }
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
  */
30 30
 abstract class ModelePdfReception extends CommonDocGenerator
31 31
 {
32
-    public $error = '';
32
+	public $error = '';
33 33
 
34 34
 
35
-    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
36
-    /**
35
+	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
36
+	/**
37 37
 	 *  Return list of active generation modules
38 38
 	 *
39
-     *  @param	DoliDB	$db     			Database handler
40
-     *  @param  integer	$maxfilenamelength  Max length of value to show
41
-     *  @return	array						List of templates
39
+	 *  @param	DoliDB	$db     			Database handler
40
+	 *  @param  integer	$maxfilenamelength  Max length of value to show
41
+	 *  @return	array						List of templates
42 42
 	 */
43 43
 	public static function liste_modeles($db, $maxfilenamelength = 0)
44 44
 	{
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
  */
62 62
 abstract class ModelNumRefReception
63 63
 {
64
-    public $error = '';
64
+	public $error = '';
65 65
 
66 66
 	/** Return if a model can be used or not
67 67
 	 *
Please login to merge, or discard this patch.
htdocs/core/modules/modMailing.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/supplier_payment/modules_supplier_payment.php 1 patch
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,10 +145,15 @@
 block discarded – undo
145 145
 		global $langs;
146 146
 		$langs->load("admin");
147 147
 
148
-		if ($this->version == 'development') return $langs->trans("VersionDevelopment");
149
-		elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
150
-		elseif ($this->version == 'dolibarr') return DOL_VERSION;
151
-		elseif ($this->version) return $this->version;
148
+		if ($this->version == 'development') {
149
+			return $langs->trans("VersionDevelopment");
150
+		} elseif ($this->version == 'experimental') {
151
+			return $langs->trans("VersionExperimental");
152
+		} elseif ($this->version == 'dolibarr') {
153
+			return DOL_VERSION;
154
+		} elseif ($this->version) {
155
+			return $this->version;
156
+		}
152 157
 		return $langs->trans("NotAvailable");
153 158
 	}
154 159
 }
Please login to merge, or discard this patch.
htdocs/core/modules/rapport/pdf_paiement_fourn.class.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
 class pdf_paiement_fourn extends pdf_paiement
32 32
 {
33 33
 	/**
34
-     *  Constructor
35
-     *
36
-     *  @param      DoliDb		$db      Database handler
34
+	 *  Constructor
35
+	 *
36
+	 *  @param      DoliDb		$db      Database handler
37 37
 	 */
38 38
 	public function __construct($db)
39 39
 	{
Please login to merge, or discard this patch.