Skip to content

Extract class for input option handling #45

@nubs

Description

@nubs

There's a common pattern in here of:

$foo = $input->getOption('foo');
if ($foo) {
    return $foo;
}

// calculate foo some other way
return $foo;

This basic behavior could be easily encapsulated inside of a method like:

return $inputHelper->getOptionOrExec('foo', $functionToCalcFoo);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions