Skip to content

Commit

Permalink
Bugfix for model subfolders
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Apr 23, 2020
1 parent e234dd4 commit 89cf42a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Drafter/Handlers/ModelHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,15 @@ protected function getModels(): array
{
continue;
}

// Get files under this namespace's "/Models" path
foreach ($locator->listNamespaceFiles($namespace, '/Models/') as $file)
{
// Load the file
require_once $file;
if (is_file($file) && pathinfo($file, PATHINFO_EXTENSION) == 'php')
{
// Load the file
require_once $file;
}
}
}

Expand Down

0 comments on commit 89cf42a

Please sign in to comment.