Skip to content

Commit

Permalink
Fix for Issue #1 for geenration of models with no GUID
Browse files Browse the repository at this point in the history
  • Loading branch information
calcinai committed Mar 5, 2015
1 parent f39f649 commit 0d9dafa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generator/generate
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ foreach($scrape_apis as $scrape_api) {

$full_uri = sprintf('%s/%s/%s/', $documentation_base, $scrape_api['uri'], $uri);
$crawler = $client->request('GET', $full_uri);

unset($current_model);

$crawler->filter('.entry-content')->children()->each(function ($node) use ($api) {
//keep static in closure.
static $page_heading, $section_name, $primary_model, $current_model;
Expand All @@ -221,7 +222,7 @@ foreach($scrape_apis as $scrape_api) {
break;
case 'table':
//If no section, we're in the overview table.
if(!isset($section_name)){
if(!isset($current_model)){

//The primary model
$primary_model = new Model();
Expand Down

0 comments on commit 0d9dafa

Please sign in to comment.