Skip to content

allow phpmetrics --git option - #122

Closed
flavius wants to merge 1 commit into
EdgedesignCZ:masterfrom
flavius:dev-allow-phpmetrics-git-option
Closed

allow phpmetrics --git option#122
flavius wants to merge 1 commit into
EdgedesignCZ:masterfrom
flavius:dev-allow-phpmetrics-git-option

Conversation

@flavius

Copy link
Copy Markdown

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

@zdenekdrahoszdenekdrahos left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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 freeto 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

@flavius@zdenekdrahos