Skip to content

Commit

Permalink
fix some code
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteCcinn committed Apr 22, 2018
1 parent 9fe4c43 commit a297421
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Entity/SetGetGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private function parseSetter(string $setterStub, array $fieldInfo)
$comment = $fieldInfo['column_comment'];
$aliasProperty = StringHelper::camel($property);
$this->checkAliasProperty($aliasProperty);
$function = StringHelper::snake($aliasProperty);
$function = StringHelper::camel($aliasProperty);
$function = 'set' . ucfirst($function);
$primaryKey = $fieldInfo['key'] === 'PRI';
$type = $this->schema->phpSchema[$fieldInfo['type']] ?? 'mixed';
Expand Down Expand Up @@ -243,7 +243,7 @@ private function parseGetter(string $getterStub, array $fieldInfo)
$comment = $fieldInfo['column_comment'];
$aliasProperty = StringHelper::camel($property);
$this->checkAliasProperty($aliasProperty);
$function = StringHelper::snake($aliasProperty);
$function = StringHelper::camel($aliasProperty);
$function = 'get' . ucfirst($function);
$default = $fieldInfo['default'] ?? '';
$dbType = $this->schema->dbSchema[$fieldInfo['type']] ?? '';
Expand Down

0 comments on commit a297421

Please sign in to comment.