/**
  * @inheritdoc
  */
 public function process(EloquentModel $model, Config $config)
 {
     $className = $config->get('class_name');
     $baseClassName = $config->get('base_class_name');
     $tableName = $config->get('table_name');
     $model->setName(new ClassNameModel($className, $this->helper->getShortClassName($baseClassName)));
     $model->addUses(new UseClassModel(ltrim($baseClassName, '\\')));
     $model->setTableName($tableName ?: $this->helper->getDefaultTableName($className));
     if ($model->getTableName() !== $this->helper->getDefaultTableName($className)) {
         $property = new PropertyModel('table', 'protected', $model->getTableName());
         $property->setDocBlock(new DocBlockModel('The table associated with the model.', '', '@var string'));
         $model->addProperty($property);
     }
 }
 /**
  * @inheritdoc
  */
 public function process(EloquentModel $model, Config $config)
 {
     if ($config->get('no_timestamps') === true) {
         $pNoTimestamps = new PropertyModel('timestamps', 'public', false);
         $pNoTimestamps->setDocBlock(new DocBlockModel('Indicates if the model should be timestamped.', '', '@var bool'));
         $model->addProperty($pNoTimestamps);
     }
     if ($config->has('date_format')) {
         $pDateFormat = new PropertyModel('dateFormat', 'protected', $config->get('date_format'));
         $pDateFormat->setDocBlock(new DocBlockModel('The storage format of the model\'s date columns.', '', '@var string'));
         $model->addProperty($pDateFormat);
     }
     if ($config->has('connection')) {
         $pConnection = new PropertyModel('connection', 'protected', $config->get('connection'));
         $pConnection->setDocBlock(new DocBlockModel('The connection name for the model.', '', '@var string'));
         $model->addProperty($pConnection);
     }
 }
 /**
  * @param Config $config
  * @return string
  */
 protected function resolveOutputPath(Config $config)
 {
     return $config->get('output_path', app_path()) . '/' . $config->get('class_name') . '.php';
 }
 /**
  * @inheritdoc
  */
 public function process(EloquentModel $model, Config $config)
 {
     $model->setNamespace(new NamespaceModel($config->get('namespace')));
 }