| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function create(){
|
||
| 31 | |||
| 32 | $schedulePath = app()->path()->schedule(); |
||
| 33 | |||
| 34 | if(!file_exists($schedulePath)){
|
||
| 35 | $this->directory['schedule'] = $schedulePath; |
||
| 36 | $this->file->makeDirectory($this); |
||
| 37 | } |
||
| 38 | |||
| 39 | $this->argument['scheduleNamespace'] = app()->namespace()->schedule(); |
||
| 40 | $this->argument['scheduleClass'] = ucfirst($this->argument['schedule']).''; |
||
| 41 | $this->argument['projectName'] = strtolower($this->projectName()); |
||
| 42 | |||
| 43 | $this->touch['schedule/schedule']= $schedulePath.'/'.$this->argument['schedule'].'.php'; |
||
| 44 | |||
| 45 | |||
| 46 | $this->file->touch($this); |
||
| 47 | |||
| 48 | echo $this->classical(' > Schedule file called as "'.$this->argument['schedule'].'" has been successfully created in the '.$schedulePath.'');
|
||
| 49 | } |
||
| 51 | } |