Total Complexity | 3 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class Cli |
||
9 | { |
||
10 | public $array = []; |
||
11 | |||
12 | public function __construct($commnad) |
||
13 | { |
||
14 | $this->array = [ |
||
15 | "--migration" => function ($file) { |
||
16 | (new FileCreate)->createFile($file); |
||
17 | echo "\e[32mMigration " . $file . " on successfully"; |
||
18 | }, |
||
19 | "--migrate" => function () { |
||
20 | echo "\e[32mStarting the migration\n"; |
||
21 | (new MigrationFile)->actionMigration(); |
||
22 | } |
||
23 | ]; |
||
24 | |||
25 | $this->handleAction($commnad); |
||
26 | } |
||
27 | |||
28 | private function handleAction($commnad) |
||
38 | } |
||
39 | } |
||
41 |