Auto generated seed file.

@return void
438575
public function run()
    {
        $baseName = str_slug(basename(base_path()), '-');
        if ($baseName == 'src') {
            $baseName = str_slug(basename(dirname(base_path())), '-');
        }

        $application = Application::withoutGlobalScopes()->firstOrCreate([
            'name' => ucwords(str_replace('-', ' ', $baseName)),
        ]);

        ApplicationUrl::withoutGlobalScopes()->firstOrCreate([
            'domain'         => $baseName.'.test',
            'application_id' => $application->getKey(),
        ]);
    }
129589
protected function _generateFiles() {
        if ($this->feature && !$this->isSelectedFeature($this->feature)) {
            $this->logFile->log(null, "did not add aspect kernel because \"$this->feature\" is not selected");
            return;
        }

        parent::_generateFiles();
        $this->files = array_merge($this->files,
                                   $this->aspectKernel->generateFiles($this->class, $this->target));
    }
178118
public function afterGenerate() {
    foreach ($this->extension as $name => $generated) {
      file_put_contents(
        $this->directory->getRealPath() . DIRECTORY_SEPARATOR . $name . '.php',
        $generated
      );
    }
  }
100760
def generate_seed(seed):
    """"""
    if seed is None:
        random.seed()
        seed = random.randint(0, sys.maxsize)
    random.seed(a=seed)

    return seed
155312
function Generate()
    {
        if ($this->cacher->MustUseCache())
        {
            $this->xml = $this->cacher->GetFromCache();
            return;
        }
        $this->AddAllPages();
        $this->xml = $this->sitemap->SaveXml();
        if ($this->cacher->MustStoreToCache())
        {
            $this->cacher->StoreToCache($this->xml);
        }
    }
160001
private function createSeeder(): void
    {
        $aFields  = $this->getArguments();
        $aCreated = [];

        try {

            $aModels = array_filter(explode(',', $aFields['MODEL_NAME']));
            sort($aModels);

            foreach ($aModels as $sModel) {

                $aFields['MODEL_NAME'] = $sModel;
                $this->oOutput->write('Creating seeder <comment>' . $sModel . '</comment>... ');

                //  Validate model exists by attempting to load it
                if (!stringToBoolean($this->oInput->getOption('skip-check'))) {
                    Factory::model($sModel, $aFields['MODEL_PROVIDER']);
                }

                //  Check for existing seeder
                $sPath = static::SEEDER_PATH . $sModel . '.php';
                if (file_exists($sPath)) {
                    throw new SeederExistsException(
                        'Seeder "' . $sModel . '" exists already at path "' . $sPath . '"'
                    );
                }

                $this->createFile($sPath, $this->getResource('template/seeder.php', $aFields));
                $aCreated[] = $sPath;
                $this->oOutput->writeln('<info>done!</info>');
            }

        } catch (\Exception $e) {
            $this->oOutput->writeln('<error>failed!</error>');
            //  Clean up created seeders
            if (!empty($aCreated)) {
                $this->oOutput->writeln('<error>Cleaning up - removing newly created files</error>');
                foreach ($aCreated as $sPath) {
                    @unlink($sPath);
                }
            }
            throw $e;
        }
    }
416675
public function exec()
    {
        $process = Seeds::exec();
        //
        $this->show($process);
        $this->backup($process);
    }
490662
public function seed($name, $paths = null)
    {
        $directories = is_null($paths) ? $this->getPaths($name, 'seeds') : $paths;
        $files       = $this->app->make('files');


        foreach ($directories as $path) {


            if ($files->isDirectory($path)) {
                $allFiles = $files->allFiles($path);


                foreach ($allFiles as $file) {

                    $class = $this->prepareSeedClass($file);
                    if (!is_null($class)) {
                        $this->seeder->call($this->prepareSeedClass($file));
                    }
                }
            }
        }
    }
27380
public function generate() {
		$phpstormGenerator = $this->getGenerator();
		$content = $phpstormGenerator->generate();

		$file = $this->getMetaFilePath();

		$currentContent = file_exists($file) ? file_get_contents($file) : null;
		if ($content === $currentContent) {
			$this->out('Meta file `/.phpstorm.meta.php/.ide-helper.meta.php` still up to date.');
			return parent::CODE_SUCCESS;
		}

		if ($this->param('dry-run')) {
			$this->out('Meta file `/.phpstorm.meta.php/.ide-helper.meta.php` needs updating.');
			return static::CODE_CHANGES;
		}

		$this->ensureDir();
		file_put_contents($file, $content);

		$this->out('Meta file `/.phpstorm.meta.php/.ide-helper.meta.php` generated.');

		return static::CODE_SUCCESS;
	}
215971
private function seed()
    {
        foreach ($this->input as $key => $value) {
            if (!$this->call($this->before, $value, $key)) {
                return;
            }

            yield $key => $value;

            if (!$this->call($this->after, $value, $key)) {
                return;
            }
        }
    }
409686
private function make($seeds_filenames)
    {
        $seed_collection = [];

        foreach ($seeds_filenames as $filename) {
            $seeds = require $filename;

            $seed_collection = array_merge($seeds, $seed_collection);
        }

        try {
            foreach ($seed_collection as $table => $seed) {
                $n = Database::table($table)->insert($seed);

                echo Color::green("$n seed".($n > 1 ? 's' : '')." on $table table\n");
            }
        } catch (\Exception $e) {
            echo Color::red($e->getMessage());

            exit(1);
        }
    }
1348305
public function generateResources()
    {

        Artisan::call('module:make-seed', [
            'name' => $this->getName(),
            'module' => $this->getName(),
            '--master' => true,
        ]);

        Artisan::call('module:make-provider', [
            'name' => $this->getName() . 'ServiceProvider',
            'module' => $this->getName(),
            '--master' => true,
        ]);

        Artisan::call('module:make-controller', [
            'controller' => $this->getName() . 'Controller',
            'module' => $this->getName(),
        ]);
    }
712695
public function generate()
    {
        $create_at = date("YmdHis");
        $filename = sprintf("Version%s%s", $create_at, ucfirst(Str::camel('sessions')));

        $generator = new Generator(
            $this->setting->getMigrationDirectory(),
            $filename
        );

        $generator->write('model/session', [
            'className' => $filename
        ]);

        echo Color::green('Session migration created.');
    }
529837
public function run()
    {
        Model::unguard();

        DB::statement('SET FOREIGN_KEY_CHECKS=0;');

        $this->call('Modules\Site\Database\Seeders\PagesTableSeeder');
        $this->call('Modules\Site\Database\Seeders\ContentsTableSeeder');

        DB::statement('SET FOREIGN_KEY_CHECKS=1;');
    }
624362
final public function generate() {
        $options = array_merge($this->options, (array) 'generate');
        Generator::call($this->called, $this->args, $options);
    }
540178
private function generateClient(): void
    {
        $this->printer->writeln('Generating client.');
        $this->generator->setNamespace($this->getNamespace());

        $code = $this->generator->generateClient($this->wsdl);
        $className = $this->findClassName($code);
        $filename = $this->destination . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php';

        $this->writer->writeFile($filename, $code);
        $this->printer->writeln("  |- Wrote $className to $filename");
    }
948905
public function generateFile()
    {
        parent::generateFile();

        if (count($this->uses) > 0) {
            sort($this->uses);
            $uses = '';
            foreach ($this->uses as $use) {
                $uses .= 'use ' . $use . ';' . $this->getNewlineCharacter();
            }
            $this->file_content = str_replace('{{ uses }}', $uses, $this->file_content);
        } else {
            $this->file_content = str_replace('{{ uses }}', '', $this->file_content);
        }
        $this->file_content = str_replace('{{ className }}', $this->class_name, $this->file_content);

        return $this->file_content;
    }