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

Projects
None yet
3 participants
@harold20
Copy link
Contributor

commented Apr 20, 2018

No description provided.

@@ -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"

This comment has been minimized.

Copy link
@jmolivas

jmolivas Apr 21, 2018

Member
  • 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')

This comment has been minimized.

Copy link
@jmolivas

jmolivas Apr 21, 2018

Member

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

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

This comment has been minimized.

Copy link
@jmolivas

jmolivas Apr 21, 2018

Member

Replace _ with -.

$languages = [];
foreach ($finder as $file) {
$file_content = array_filter(explode("\n", file_get_contents($file->getPathname())));

This comment has been minimized.

Copy link
@jmolivas

jmolivas Apr 21, 2018

Member

replace \n with constant PHP_EOL

->notName(date('Y_m_d').'-pending.csv')
->in($path);
$statistics_keys = ['command', 'language', 'linesOfCode'];

This comment has been minimized.

Copy link
@jmolivas

jmolivas Apr 21, 2018

Member

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
You can’t perform that action at this time.