@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | /* |
| 6 | 6 | * This file is part of the dotfiles project. |
@@ -128,6 +128,6 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | public static function stripPath(string $path) |
| 130 | 130 | { |
| 131 | - return substr($path,-30); |
|
| 131 | + return substr($path, -30); |
|
| 132 | 132 | } |
| 133 | 133 | } |
@@ -16,9 +16,9 @@ discard block |
||
| 16 | 16 | $this |
| 17 | 17 | ->setName('add') |
| 18 | 18 | ->setDescription('Add new file into dotfiles manager') |
| 19 | - ->addArgument('path', InputArgument::REQUIRED,'A file or directory name to add. This file must be exists in $HOME directory') |
|
| 20 | - ->addOption('machine','-m', InputOption::VALUE_OPTIONAL, 'Add this file/directory into machine registry','default') |
|
| 21 | - ->addOption('recursive','-r', InputOption::VALUE_NONE, 'Import all directory contents recursively') |
|
| 19 | + ->addArgument('path', InputArgument::REQUIRED, 'A file or directory name to add. This file must be exists in $HOME directory') |
|
| 20 | + ->addOption('machine', '-m', InputOption::VALUE_OPTIONAL, 'Add this file/directory into machine registry', 'default') |
|
| 21 | + ->addOption('recursive', '-r', InputOption::VALUE_NONE, 'Import all directory contents recursively') |
|
| 22 | 22 | ; |
| 23 | 23 | } |
| 24 | 24 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $sourcePath = $input->getArgument("path"); |
| 31 | 31 | $source = getenv("HOME").DIRECTORY_SEPARATOR.$sourcePath; |
| 32 | 32 | |
| 33 | - if(!is_file($source)){ |
|
| 33 | + if (!is_file($source)) { |
|
| 34 | 34 | throw new \InvalidArgumentException("Path <comment>$sourcePath</comment> not exists"); |
| 35 | 35 | } |
| 36 | 36 | Toolkit::ensureDir($dir); |