@@ -25,9 +25,11 @@ |
||
25 | 25 | * |
26 | 26 | * @return void |
27 | 27 | */ |
28 | - public function do() |
|
28 | + public function do { |
|
29 | + () |
|
29 | 30 | { |
30 | 31 | global $globalaaa, $globalbbb; |
32 | + } |
|
31 | 33 | echo 'dobbb'."\n"; |
32 | 34 | $globalaaa.='+bbb'; |
33 | 35 | $globalbbb.='+bbb'; |
@@ -27,8 +27,10 @@ |
||
27 | 27 | * |
28 | 28 | * @return void |
29 | 29 | */ |
30 | - public function do() |
|
30 | + public function do { |
|
31 | + () |
|
31 | 32 | { |
32 | 33 | echo 'doaaa'."\n"; |
33 | 34 | } |
35 | + } |
|
34 | 36 | } |
@@ -1,6 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | // File generated to link to the master file - DO NOT MODIFY - It is just an include |
3 | 3 | if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { |
4 | - if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
4 | + if (! defined('USEEXTERNALSERVER')) { |
|
5 | + define('USEEXTERNALSERVER', 1); |
|
6 | + } |
|
5 | 7 | require_once '/var/www/html/dolibarr_dev/htdocs/master.inc.php'; |
6 | 8 | } |
@@ -1,7 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | // File generated to link to the master file - DO NOT MODIFY - It is just an include |
3 | 3 | if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { |
4 | - if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
4 | + if (! defined('USEEXTERNALSERVER')) { |
|
5 | + define('USEEXTERNALSERVER', 1); |
|
6 | + } |
|
5 | 7 | require_once '/home/ldestailleur/git/dolibarr_dev/htdocs/master.inc.php'; |
6 | 8 | } |
7 | 9 | ?> |
@@ -1,6 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | // File generated to link to the master file - DO NOT MODIFY - It is just an include |
3 | 3 | if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { |
4 | - if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
4 | + if (! defined('USEEXTERNALSERVER')) { |
|
5 | + define('USEEXTERNALSERVER', 1); |
|
6 | + } |
|
5 | 7 | require_once '/home/ldestailleur/git/dolibarr_dev/htdocs/master.inc.php'; |
6 | 8 | } |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('ODTPHP_PATHTOPCLZIP')) define('ODTPHP_PATHTOPCLZIP','pclzip/'); |
|
2 | +if (! defined('ODTPHP_PATHTOPCLZIP')) { |
|
3 | + define('ODTPHP_PATHTOPCLZIP','pclzip/'); |
|
4 | +} |
|
3 | 5 | require_once ODTPHP_PATHTOPCLZIP.'pclzip.lib.php'; |
4 | 6 | require_once 'ZipInterface.php'; |
5 | 7 | class PclZipProxyException extends Exception |
@@ -32,7 +34,10 @@ discard block |
||
32 | 34 | throw new PclZipProxyException('PclZip class not loaded - PclZip library |
33 | 35 | is required for using PclZipProxy'); ; |
34 | 36 | } |
35 | - if ($forcedir) $this->tmpdir=preg_replace('|[//\/]$|','',$forcedir); // $this->tmpdir must not contains / at the end |
|
37 | + if ($forcedir) { |
|
38 | + $this->tmpdir=preg_replace('|[//\/]$|','',$forcedir); |
|
39 | + } |
|
40 | + // $this->tmpdir must not contains / at the end |
|
36 | 41 | } |
37 | 42 | |
38 | 43 | /** |
@@ -88,10 +88,16 @@ discard block |
||
88 | 88 | { |
89 | 89 | // To provide debug information on line number processed |
90 | 90 | global $count; |
91 | - if (empty($count)) $count=1; |
|
92 | - else $count++; |
|
91 | + if (empty($count)) { |
|
92 | + $count=1; |
|
93 | + } else { |
|
94 | + $count++; |
|
95 | + } |
|
93 | 96 | |
94 | - if (empty($this->savxml)) $this->savxml = $this->xml; // Sav content of line at first line merged, so we will reuse original for next steps |
|
97 | + if (empty($this->savxml)) { |
|
98 | + $this->savxml = $this->xml; |
|
99 | + } |
|
100 | + // Sav content of line at first line merged, so we will reuse original for next steps |
|
95 | 101 | $this->xml = $this->savxml; |
96 | 102 | $tmpvars = $this->vars; // Store into $tmpvars so we won't modify this->vars when completing data with empty values |
97 | 103 | |
@@ -123,7 +129,9 @@ discard block |
||
123 | 129 | $reg = '@\[!--\sIF\s' . $key . '\s--\](.*)(\[!--\sELSE\s' . $key . '\s--\](.*))?\[!--\sENDIF\s' . $key . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy |
124 | 130 | preg_match_all($reg, $this->xml, $matches, PREG_SET_ORDER); |
125 | 131 | foreach ($matches as $match) { // For each match, if there is an ELSE clause, we replace the whole block by the value in the ELSE clause |
126 | - if (!empty($match[3])) $this->xml = str_replace($match[0], $match[3], $this->xml); |
|
132 | + if (!empty($match[3])) { |
|
133 | + $this->xml = str_replace($match[0], $match[3], $this->xml); |
|
134 | + } |
|
127 | 135 | } |
128 | 136 | // Cleanup the other conditional blocks (all the others where there were no ELSE clause, we can just remove them altogether) |
129 | 137 | $this->xml = preg_replace($reg, '', $this->xml); |
@@ -25,8 +25,9 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public static function contains($haystack, $needle, $caseSensitive = true) |
27 | 27 | { |
28 | - if (empty($needle)) |
|
29 | - return true; |
|
28 | + if (empty($needle)) { |
|
29 | + return true; |
|
30 | + } |
|
30 | 31 | return $caseSensitive |
31 | 32 | ? strpos($haystack, $needle) !== false |
32 | 33 | : stripos($haystack, $needle) !== false; |
@@ -62,7 +63,9 @@ discard block |
||
62 | 63 | } |
63 | 64 | |
64 | 65 | // @CHANGE LDR |
65 | - if (!is_string($haystack)) return false; |
|
66 | + if (!is_string($haystack)) { |
|
67 | + return false; |
|
68 | + } |
|
66 | 69 | |
67 | 70 | return (substr($haystack, -$length) === $needle); |
68 | 71 | } |
@@ -25,9 +25,13 @@ |
||
25 | 25 | { |
26 | 26 | $copy = array(); |
27 | 27 | foreach ($arr as $key => $value) { |
28 | - if (is_array($value)) $copy[$key] = static::copy($value); |
|
29 | - else if (is_object($value)) $copy[$key] = clone $value; |
|
30 | - else $copy[$key] = $value; |
|
28 | + if (is_array($value)) { |
|
29 | + $copy[$key] = static::copy($value); |
|
30 | + } else if (is_object($value)) { |
|
31 | + $copy[$key] = clone $value; |
|
32 | + } else { |
|
33 | + $copy[$key] = $value; |
|
34 | + } |
|
31 | 35 | } |
32 | 36 | return $copy; |
33 | 37 | } |