@@ -7,9 +7,13 @@ |
||
7 | 7 | |
8 | 8 | |
9 | 9 | public function createFile(string $fileName){ |
10 | - if(!file_exists(CONFIG_PATH)) mkdir(CONFIG_PATH,0777,true); |
|
10 | + if(!file_exists(CONFIG_PATH)) { |
|
11 | + mkdir(CONFIG_PATH,0777,true); |
|
12 | + } |
|
11 | 13 | $fileName = ucfirst($fileName); |
12 | - if(file_exists(CONFIG_PATH ."/" .$fileName . ".php")) throw new \Exception("Arquivo ja existe"); |
|
14 | + if(file_exists(CONFIG_PATH ."/" .$fileName . ".php")) { |
|
15 | + throw new \Exception("Arquivo ja existe"); |
|
16 | + } |
|
13 | 17 | $file = fopen(CONFIG_PATH . "/" . $fileName . ".php",'w+'); |
14 | 18 | if($file){ |
15 | 19 | $text = $this->copyFile(); |