php-cs fix files
This commit is contained in:
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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]);
|
||||||
@ -69,7 +70,7 @@ readonly class stow
|
|||||||
} else {
|
} else {
|
||||||
line("File $targetFile is linked from $targetLink, ignoring, add -w to unwrap");
|
line("File $targetFile is linked from $targetLink, ignoring, add -w to unwrap");
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
line("File $targetFile is already linked from $targetLink");
|
line("File $targetFile is already linked from $targetLink");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user