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

[console] Implement statistics feature #342

Merged
merged 17 commits into from
May 28, 2019

Conversation

hjuarez20
Copy link
Contributor

No description provided.

composer.json Outdated
@@ -52,7 +52,8 @@
"symfony/yaml": "~2.8|~3.0",
"twig/twig": "^1.23.1",
"webflo/drupal-finder": "^1.0",
"webmozart/path-util": "^2.3"
"webmozart/path-util": "^2.3",
"guzzlehttp/guzzle": "^6.3"
Copy link
Member

Choose a reason for hiding this comment

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

  • Update drupal/console-core dependency "guzzlehttp/guzzle": "~6.1" as set on drupal/console repository.
  • Remove guzzlehttp/guzzle from drupal/console repository.


$dispatcher->addSubscriber(
new CalculateStatisticsListener(
$this->container->get('console.configuration_manager')
Copy link
Member

Choose a reason for hiding this comment

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

Remove this service and read config file directly from user home directory.

$finder
->files()
->name('*-pending.csv')
->notName(date('Y_m_d').'-pending.csv')
Copy link
Member

Choose a reason for hiding this comment

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

Replace _ with -.

$languages = [];

foreach ($finder as $file) {
$file_content = array_filter(explode("\n", file_get_contents($file->getPathname())));
Copy link
Member

Choose a reason for hiding this comment

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

replace \n with constant PHP_EOL

->notName(date('Y_m_d').'-pending.csv')
->in($path);

$statistics_keys = ['command', 'language', 'linesOfCode'];
Copy link
Member

@jmolivas jmolivas Apr 21, 2018

Choose a reason for hiding this comment

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

replace statistics_keys with statisticsKeys

@enzolutions enzolutions merged commit c4d578d into hechoendrupal:master May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants