protected function write($data) { $destination = $this->composer->getClassPath($this->data['name']); if ($this->force && $this->external->has($destination)) { $this->external->delete($destination); } return $this->external->write($destination, $data); }
public function fire() { $data = ['name' => $this->argument('name')]; $result = $this->generator->setData($data)->setForce($this->option('force'))->make(); if ($result) { $this->info('Interface: ' . $this->composer->getClassPath($this->argument('name')) . ' created'); } else { $this->error('Something went wrong!'); } }