JonathanTorres\Construct\Construct::license PHP Метод

license() защищенный Метод

Generate LICENSE.md file.
protected license ( JonathanTorres\Construct\Helpers\Git $git ) : void
$git JonathanTorres\Construct\Helpers\Git The git helper.
Результат void
    protected function license(Git $git)
    {
        $file = $this->file->get(__DIR__ . '/stubs/licenses/' . strtolower($this->settings->getLicense()) . '.stub');
        $user = $git->getUser();
        $content = str_replace(['{year}', '{author_name}'], [(new \DateTime())->format('Y'), $user['name']], $file);
        $this->file->put($this->projectLower . '/' . 'LICENSE.md', $content);
        $this->exportIgnores[] = 'LICENSE.md';
    }