@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $match = []; |
143 | 143 | |
144 | 144 | //Regex sur le paramètre pour récupéré le type de modification |
145 | - if(preg_match('#(\+|\-)([0-9]+) ([a-z]+)#i', $modify, $match) !== 1) { |
|
145 | + if (preg_match('#(\+|\-)([0-9]+) ([a-z]+)#i', $modify, $match) !== 1) { |
|
146 | 146 | throw new Exceptio('Date::modify pattern not match.'); |
147 | 147 | } |
148 | 148 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $dateDepart = clone $this; |
156 | 156 | parent::modify($match[1].$match[2].' '.$keyword); |
157 | 157 | |
158 | - if($dateDepart == $this) { |
|
158 | + if ($dateDepart == $this) { |
|
159 | 159 | throw new Exception('Parameter '.$match[3].' is unknown.'); |
160 | 160 | } |
161 | 161 | } |
@@ -53,31 +53,31 @@ |
||
53 | 53 | */ |
54 | 54 | function displayMsg($msg, $colorTxt = null, $colorBg = null, $style = 'normal') |
55 | 55 | { |
56 | - if($colorTxt == null) { |
|
56 | + if ($colorTxt == null) { |
|
57 | 57 | echo $msg."\n"; |
58 | 58 | return; |
59 | 59 | } |
60 | 60 | |
61 | 61 | //Gestion cas avec couleur |
62 | 62 | $styleNum = styleForShell($style); |
63 | - if($styleNum === false) { |
|
63 | + if ($styleNum === false) { |
|
64 | 64 | $styleNum = styleForShell('normal'); |
65 | 65 | } |
66 | 66 | |
67 | 67 | $colorTxtNum = colorForShell('white', 'txt'); |
68 | - if($colorTxt !== null) { |
|
68 | + if ($colorTxt !== null) { |
|
69 | 69 | $colorTxtNumArg = colorForShell($colorTxt, 'txt'); |
70 | 70 | |
71 | - if($colorTxtNumArg !== false) { |
|
71 | + if ($colorTxtNumArg !== false) { |
|
72 | 72 | $colorTxtNum = $colorTxtNumArg; |
73 | 73 | } |
74 | 74 | } |
75 | 75 | |
76 | 76 | $colorBgNum = colorForShell('black', 'bg'); |
77 | - if($colorBg !== null) { |
|
77 | + if ($colorBg !== null) { |
|
78 | 78 | $colorBgNumArg = colorForShell($colorBg, 'bg'); |
79 | 79 | |
80 | - if($colorBgNumArg !== false) { |
|
80 | + if ($colorBgNumArg !== false) { |
|
81 | 81 | $colorBgNum = $colorBgNumArg; |
82 | 82 | } |
83 | 83 | } |
@@ -225,22 +225,22 @@ |
||
225 | 225 | $targetDirectory = $this->bfwConfigPath; |
226 | 226 | $alreadyExist = file_exists($targetDirectory); |
227 | 227 | |
228 | - if($alreadyExist && $this->forceReinstall === true) { |
|
228 | + if ($alreadyExist && $this->forceReinstall === true) { |
|
229 | 229 | echo '[Force Reinstall: Remove symlink] '; |
230 | 230 | $alreadyExist = false; |
231 | 231 | |
232 | - if(!rmdir($targetDirectory)) { |
|
232 | + if (!rmdir($targetDirectory)) { |
|
233 | 233 | echo "\033[1;31m Remove module config directory fail.\033[0m\n"; |
234 | 234 | throw new Exception('Reinstall fail. Remove module config directory error.'); |
235 | 235 | } |
236 | 236 | } |
237 | 237 | |
238 | - if($alreadyExist) { |
|
238 | + if ($alreadyExist) { |
|
239 | 239 | echo "\033[1;33m Already exist.\033[0m\n"; |
240 | 240 | return true; |
241 | 241 | } |
242 | 242 | |
243 | - if(mkdir($targetDirectory, 0755)) { |
|
243 | + if (mkdir($targetDirectory, 0755)) { |
|
244 | 244 | echo "\033[1;32m Created. \033[0m\n"; |
245 | 245 | return true; |
246 | 246 | } |