src/Command/ConfigureCommand.php 1 location
|
@@ 62-77 (lines=16) @@
|
| 59 |
|
* |
| 60 |
|
* @return InitCommand |
| 61 |
|
*/ |
| 62 |
|
protected function createProjectDirectory($directory, OutputInterface $output) |
| 63 |
|
{ |
| 64 |
|
$output->writeln("<info>Creating project directory...</info>"); |
| 65 |
|
|
| 66 |
|
if (file_exists($directory)) { |
| 67 |
|
$output->writeln("<comment>Project directory already exists at {$directory}.</comment>"); |
| 68 |
|
|
| 69 |
|
return $this; |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
mkdir($directory, 0755, true); |
| 73 |
|
|
| 74 |
|
$output->writeln("<info>Project directory created at {$directory}!</info>"); |
| 75 |
|
|
| 76 |
|
return $this; |
| 77 |
|
} |
| 78 |
|
} |
| 79 |
|
|
src/Command/NewCommand.php 1 location
|
@@ 48-63 (lines=16) @@
|
| 45 |
|
* |
| 46 |
|
* @return InitCommand |
| 47 |
|
*/ |
| 48 |
|
protected function createProjectDirectory($directory, OutputInterface $output) |
| 49 |
|
{ |
| 50 |
|
$output->writeln("<info>Creating project directory...</info>"); |
| 51 |
|
|
| 52 |
|
if (file_exists($directory)) { |
| 53 |
|
$output->writeln("<comment>Project directory already exists at {$directory}.</comment>"); |
| 54 |
|
|
| 55 |
|
return $this; |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
mkdir($directory, 0755, true); |
| 59 |
|
|
| 60 |
|
$output->writeln("<info>Project directory created at {$directory}!</info>"); |
| 61 |
|
|
| 62 |
|
return $this; |
| 63 |
|
} |
| 64 |
|
} |
| 65 |
|
|