Skip to content

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.

2 participants