laravel-shift / factory-generator

MIT License
41 stars 20 forks source link

Make sure the actual namespace is captured #16

Closed mortenscheel closed 3 years ago

mortenscheel commented 3 years ago

I had a class like this:

<?php
/** @todo move to separate namespace */
namespace App;

class SomeClass
{
   //...
}

Which made loadModels() interpret the FQN as */\SomeClass because it just captures whatever comes after the first occurence of namespace.

This change ignores occurences of namespace that are not at the beginning of the line.

jasonmccreary commented 3 years ago

Thanks!