src/commands/MigrateController.php
protected function clearNamespace(string $class)
    {
        if (file_exists($class)) {
            $content = file_get_contents($class);
            $content = preg_replace('#^namespace\s+(.+?);$#sm', ' ', $content);
            file_put_contents($class, $content);
        }
    }
protected function clearNamespace(string $class)
    {
        if (file_exists($class)) {
            $content = file_get_contents($class);
            $content = preg_replace('#^namespace\s+(.+?);$#sm', ' ', $content);
            file_put_contents($class, $content);
        }
    }
protected function clearNamespace ( string $ class ) { if ( file_exists ( $ class ) ) { $ content = file_get_contents ( $ class ) ; $ content = preg_replace ( '#^namespace\s+(.+?);$#sm' , ' ' , $ content ) ; file_put_contents ( $ class , $ content ) ; } }
Clear namespace to php class file.
@param string $class
Clear namespace to php class file .