You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't a 100% thing, but the more I'm using the CliScriptHelper the more I'm wondering if requiring every action to receive a ConsoleHelper dependency is just pointless dependency decoupling?
The way it works today:
$ch = newConsoleHelper($argv);
$script = (newCliScriptHelper(
"My Script",
"What my script does"
))->addOption(
"file",
"f",
"file",
"Set a file",
"Set a file to use"
);
$script->startScript($ch);
$opts = $script->getOptions($ch);
The question is, does it make more sense to change the above to be this?
$ch = newConsoleHelper($argv);
$script = (newCliScriptHelper(
$ch,
"My Script",
"What my script does"
))->addOption(
"file",
"f",
"file",
"Set a file",
"Set a file to use"
);
$script->startScript();
$opts = $script->getOptions();
The text was updated successfully, but these errors were encountered:
This isn't a 100% thing, but the more I'm using the
CliScriptHelper
the more I'm wondering if requiring every action to receive aConsoleHelper
dependency is just pointless dependency decoupling?The way it works today:
The question is, does it make more sense to change the above to be this?
The text was updated successfully, but these errors were encountered: