Skip to content

Commit 3bc7b81

Browse files
Reduce complexity of main run function
1 parent b040326 commit 3bc7b81

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/App.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace ecoAPM\LibYear;
44

55
use cli\Table;
6+
use Garden\Cli\Args;
67
use Garden\Cli\Cli;
78
use Exception;
89

@@ -52,6 +53,11 @@ public function run(array $args): bool
5253
return true;
5354
}
5455

56+
return $this->runWithParsedArguments($arguments);
57+
}
58+
59+
private function runWithParsedArguments(Args $arguments): bool
60+
{
5561
$quiet_mode = $arguments->getOpt('quiet') !== null;
5662
$update_mode = $arguments->getOpt('update') !== null;
5763
$verbose_mode = $arguments->getOpt('verbose') !== null;

0 commit comments

Comments
 (0)