-
Notifications
You must be signed in to change notification settings - Fork 70
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
[console] Implement statistics feature #342
Conversation
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" |
There was a problem hiding this comment.
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 ondrupal/console
repository. - Remove
guzzlehttp/guzzle
fromdrupal/console
repository.
src/Application.php
Outdated
|
||
$dispatcher->addSubscriber( | ||
new CalculateStatisticsListener( | ||
$this->container->get('console.configuration_manager') |
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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()))); |
There was a problem hiding this comment.
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']; |
There was a problem hiding this comment.
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
No description provided.