1 | <?php |
||
8 | class FakeIdSetupCommand extends Command |
||
9 | { |
||
10 | /** |
||
11 | * The name and signature of the console command. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $signature = 'fakeid:setup |
||
16 | {--o|overwrite : Silently overwrite existing configuration} |
||
17 | {--p|preserve : Silently preserves existing configuration}'; |
||
18 | |||
19 | /** |
||
20 | * The console command description. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $description = 'Configures FakeId for use'; |
||
25 | |||
26 | /** |
||
27 | * Execute the console command. |
||
28 | * |
||
29 | * @return void |
||
30 | */ |
||
31 | public function handle() |
||
56 | |||
57 | /** |
||
58 | * Checks if the given file array contains existing FakeId configuration. |
||
59 | */ |
||
60 | protected function hasExistingConfiguration($file) |
||
64 | |||
65 | /** |
||
66 | * Removes existing FakeId configuration from the given file array. |
||
67 | * |
||
68 | * @param array $file |
||
69 | */ |
||
70 | protected function removeExistingConfiguration(&$file) |
||
78 | |||
79 | /** |
||
80 | * Writes new configuration using the provided file array to the given path. |
||
81 | * |
||
82 | * @param array $file |
||
83 | * @param string $path |
||
84 | */ |
||
85 | protected function writeNewConfiguration($file, $path) |
||
95 | } |
||
96 |