php-cs fix files

This commit is contained in:
Tim
2025-06-25 11:29:20 +02:00
parent 737060f0a5
commit 77c9a0ab62
5 changed files with 381 additions and 377 deletions

View File

@ -4,7 +4,8 @@ class argParsed
{
public function __construct(
private array $parsed = [],
) {}
) {
}
public function initOptions(array $options, mixed $default = false): self
{
@ -41,7 +42,8 @@ readonly class argvParser
public function __construct(
private array $options = [],
private array $arguments = [],
) {}
) {
}
public function getOptionsHelp(): string
{

View File

@ -8,8 +8,7 @@ readonly class homeConfig extends config
public function __construct(
string $name
)
{
) {
parent::__construct(path(
getenv('HOME'),
self::CONFIG_BASE_PATH,
@ -36,7 +35,8 @@ readonly class config
public function __construct(
private string $path,
private string $fileName = 'config.php',
) {}
) {
}
public function configExists(): bool
{

View File

@ -5,7 +5,8 @@ readonly class snips
public function __construct(
private string $baseUrl,
private string $apiKey,
) {}
) {
}
public function getSnip(int $id): string
{

View File

@ -14,7 +14,8 @@ readonly class stow
private bool $backup = false,
private bool $force = false,
private bool $unwrap = false,
) {}
) {
}
private function getNoStow(string $path): array
{
@ -29,7 +30,7 @@ readonly class stow
}
}
function run(string $sourcePath, string $targetPath): void
public function run(string $sourcePath, string $targetPath): void
{
$noStow = $this->getNoStow($sourcePath);
$sourceFiles = array_diff(scandir($sourcePath), ['..', '.', self::CONFIG_FILE_NAME, self::STOW_IGNORE_FILE, ...$noStow]);
@ -69,7 +70,7 @@ readonly class stow
} else {
line("File $targetFile is linked from $targetLink, ignoring, add -w to unwrap");
}
}else{
} else {
line("File $targetFile is already linked from $targetLink");
}
}