public function __construct($appRoot, CliConfig $cliConfig = null, $sourceDir = null)
{
if (!is_dir($appRoot)) {
throw new \InvalidArgumentException("Application directory not found: {$appRoot}");
}
$this->cliConfig = $cliConfig ?: new CliConfig();
$this->appRoot = $appRoot;
$this->sourceDir = $sourceDir ?: $appRoot;
}