Skip to content

Commit

Permalink
Merge pull request #40 from beeex/master
Browse files Browse the repository at this point in the history
#38 Fix Exception:syntax error, unexpected '->' (T_OBJECT_OPERATOR)
  • Loading branch information
iberflow authored Apr 6, 2017
2 parents 2d206d1 + 7272072 commit d92d018
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Commands/MakeModelsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ public function fire()
$tables = $this->getSchemaTables();

foreach ($tables as $table) {
$this->generateTable( ((object) $table)->name );
$table = (object) $table;
$this->generateTable( $table->name );
}
}

Expand Down Expand Up @@ -383,7 +384,8 @@ protected function getTablePrimaryKey($table)
}

if (count($primaryKeyResult) == 1) {
return ((object) $primaryKeyResult[0])->COLUMN_NAME;
$table = (object) $primaryKeyResult[0];
return $table->COLUMN_NAME;
}

return null;
Expand Down

0 comments on commit d92d018

Please sign in to comment.