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

View File

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

View File

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

View File

@ -14,7 +14,8 @@ readonly class stow
private bool $backup = false, private bool $backup = false,
private bool $force = false, private bool $force = false,
private bool $unwrap = false, private bool $unwrap = false,
) {} ) {
}
private function getNoStow(string $path): array 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); $noStow = $this->getNoStow($sourcePath);
$sourceFiles = array_diff(scandir($sourcePath), ['..', '.', self::CONFIG_FILE_NAME, self::STOW_IGNORE_FILE, ...$noStow]); $sourceFiles = array_diff(scandir($sourcePath), ['..', '.', self::CONFIG_FILE_NAME, self::STOW_IGNORE_FILE, ...$noStow]);