Passed
Push — MINOR_OPTIMIZATIONS_241106 ( 63568c )
by Rafael
57:48
created
public/htdocs/modulebuilder/template/js/mymodule.js.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@
 block discarded – undo
45 45
 // Important: Following code is to cache this file to avoid page request by browser at each Dolibarr page access.
46 46
 // You can use CTRL+F5 to refresh your browser cache.
47 47
 if (empty($dolibarr_nocache)) {
48
-	header('Cache-Control: max-age=3600, public, must-revalidate');
48
+    header('Cache-Control: max-age=3600, public, must-revalidate');
49 49
 } else {
50
-	header('Cache-Control: no-cache');
50
+    header('Cache-Control: no-cache');
51 51
 }
52 52
 ?>
53 53
 
Please login to merge, or discard this patch.
public/htdocs/modulebuilder/template/scripts/mymodule.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 
54 54
 // Test if batch mode
55 55
 if (substr($sapi_type, 0, 3) == 'cgi') {
56
-	echo "Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode.\n";
57
-	exit(-1);
56
+    echo "Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode.\n";
57
+    exit(-1);
58 58
 }
59 59
 
60 60
 // Global variables
@@ -74,28 +74,28 @@  discard block
 block discarded – undo
74 74
 $i = strlen($tmp) - 1;
75 75
 $j = strlen($tmp2) - 1;
76 76
 while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
77
-	$i--;
78
-	$j--;
77
+    $i--;
78
+    $j--;
79 79
 }
80 80
 if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)) . "/master.inc.php")) {
81
-	$res = @include substr($tmp, 0, ($i + 1)) . "/master.inc.php";
81
+    $res = @include substr($tmp, 0, ($i + 1)) . "/master.inc.php";
82 82
 }
83 83
 if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))) . "/master.inc.php")) {
84
-	$res = @include dirname(substr($tmp, 0, ($i + 1))) . "/master.inc.php";
84
+    $res = @include dirname(substr($tmp, 0, ($i + 1))) . "/master.inc.php";
85 85
 }
86 86
 // Try master.inc.php using relative path
87 87
 if (!$res && file_exists("../master.inc.php")) {
88
-	$res = @include "../master.inc.php";
88
+    $res = @include "../master.inc.php";
89 89
 }
90 90
 if (!$res && file_exists("../../master.inc.php")) {
91
-	$res = @include "../../master.inc.php";
91
+    $res = @include "../../master.inc.php";
92 92
 }
93 93
 if (!$res && file_exists("../../../master.inc.php")) {
94
-	$res = @include "../../../master.inc.php";
94
+    $res = @include "../../../master.inc.php";
95 95
 }
96 96
 if (!$res) {
97
-	print "Include of master fails";
98
-	exit(-1);
97
+    print "Include of master fails";
98
+    exit(-1);
99 99
 }
100 100
 // After this $db, $mysoc, $langs, $conf and $hookmanager are defined (Opened $db handler to database will be closed at end of file).
101 101
 // $user is created but empty.
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 // Load user and its permissions
107 107
 $result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
108 108
 if (!($result > 0)) {
109
-	dol_print_error(null, $user->error);
110
-	exit;
109
+    dol_print_error(null, $user->error);
110
+    exit;
111 111
 }
112 112
 $user->getrights();
113 113
 
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 
121 121
 print "***** " . $script_file . " (" . $version . ") pid=" . dol_getmypid() . " *****\n";
122 122
 if (!isset($argv[1])) { // Check parameters
123
-	print "Usage: " . $script_file . " param1 param2 ...\n";
124
-	exit(-1);
123
+    print "Usage: " . $script_file . " param1 param2 ...\n";
124
+    exit(-1);
125 125
 }
126 126
 print '--- start' . "\n";
127 127
 print 'Argument 1=' . $argv[1] . "\n";
@@ -212,11 +212,11 @@  discard block
 block discarded – undo
212 212
 // -------------------- END OF YOUR CODE --------------------
213 213
 
214 214
 if (!$error) {
215
-	$db->commit();
216
-	print '--- end ok' . "\n";
215
+    $db->commit();
216
+    print '--- end ok' . "\n";
217 217
 } else {
218
-	print '--- end error code=' . $error . "\n";
219
-	$db->rollback();
218
+    print '--- end error code=' . $error . "\n";
219
+    $db->rollback();
220 220
 }
221 221
 
222 222
 $db->close(); // Close $db database opened handler
Please login to merge, or discard this patch.
public/htdocs/takepos/css/pos.css.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
23 23
  */
24 24
 
25
- use Alxarafe\Lib\Functions;use Dolibarr\Lib\ViewCss;
25
+    use Alxarafe\Lib\Functions;use Dolibarr\Lib\ViewCss;
26 26
 
27 27
 /**
28 28
  *      \file       htdocs/takepos/css/pos.css.php
Please login to merge, or discard this patch.
public/htdocs/public/website/styles.css.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@
 block discarded – undo
18 18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 19
  */
20 20
 
21
- use Alxarafe\Lib\Functions;use Dolibarr\Code\Website\Classes\Website;use Dolibarr\Code\Website\Classes\WebsitePage;
21
+    use Alxarafe\Lib\Functions;use Dolibarr\Code\Website\Classes\Website;use Dolibarr\Code\Website\Classes\WebsitePage;
22 22
 
23
- /**
24
- *      \file       htdocs/public/website/styles.css.php
25
- *      \ingroup    website
26
- *      \brief      Page to output style page. Called with <link rel="stylesheet" href="styles.css.php?websiteid=123" type="text/css" />
27
- */
23
+    /**
24
+     *      \file       htdocs/public/website/styles.css.php
25
+     *      \ingroup    website
26
+     *      \brief      Page to output style page. Called with <link rel="stylesheet" href="styles.css.php?websiteid=123" type="text/css" />
27
+     */
28 28
 
29 29
 Functions::defineIfNotDefined('NOTOKENRENEWAL', 1);  // Disables token renewal
30 30
 Functions::defineIfNotDefined('NOLOGIN', 1);   // No login needed
Please login to merge, or discard this patch.