for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Startwind\Forrest\CliCommand\Repository;
use Startwind\Forrest\CliCommand\ForrestCommand;
abstract class RepositoryCommand extends ForrestCommand
{
/**
* Normalize the repository name to fit as an identifier.
*/
protected function getIdentifierSuggestion(string $name): string
return strtolower(str_replace(' ', '-', $name));
}
* Register a new repository
protected function registerRepository(string $identifier, string $name, string $description, string $repositoryFileName): void
$repoArray = [
'adapter' => 'yaml',
'name' => $name,
'description' => $description,
'config' => [
'file' => $repositoryFileName
]
];
$configHandler = $this->getConfigHandler();
$config = $configHandler->parseConfig();
$config->addRepository($identifier, $repoArray);
$configHandler->dumpConfig($config);