Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow phpmetrics --git option #122

Closed

Conversation

flavius
Copy link

@flavius flavius commented Mar 13, 2018

phpmetrics is able to show some basic git statistics, if instructed so. Add option in phpqa to make it possible.

Copy link
Member

@zdenekdrahos zdenekdrahos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add new option to:

Refactoring:

  • if conditions ?
  • maybe phpmetrics.gitBinary would be better name ?

} else {
$args['git'] = $git;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If conditions are not really understandable without looking into vendor/bin/phpmetrics --help. I would prefer something like that:

$gitBinary = $this->config->value('phpmetrics.git');
if ($gitBinary) {
    $args['git'] = is_file($gitBinary) ? $gitBinary : 'git';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants