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

EditCounter: Rework month and year counts, horizontal bar chart #66

Merged
merged 1 commit into from Aug 1, 2017

Conversation

Projects
None yet
3 participants
@MusikAnimal
Member

MusikAnimal commented Jul 26, 2017

Only show months from registration date to present

getRegistrationDate() added to User

This is a precursor to T171277. The JS to add the actual totals for each month is a little tricky, so I wanted to first get this preliminary work out as a separate PR.

@MusikAnimal MusikAnimal requested review from samwilson and Matthewrbowker Jul 26, 2017

@MusikAnimal

This comment has been minimized.

Member

MusikAnimal commented Jul 26, 2017

Actually, I want to write a test for EditCounter::monthCounts, but I need to somehow mock the current time. @samwilson How stupid would it be to add an optional parameter $currentDateTime to monthCounts, that would be used in place of new DateTime('last day of this month'), solely for the purpose of unit testing?

@Matthewrbowker

Looks good.

@codecov-io

This comment has been minimized.

codecov-io commented Jul 28, 2017

Codecov Report

Merging #66 into master will increase coverage by 1.73%.
The diff coverage is 75.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
+ Coverage   18.68%   20.41%   +1.73%     
==========================================
  Files          33       33              
  Lines        3988     4011      +23     
==========================================
+ Hits          745      819      +74     
+ Misses       3243     3192      -51
Impacted Files Coverage Δ
src/Xtools/EditCounterRepository.php 0% <ø> (ø) ⬆️
src/Xtools/UserRepository.php 0% <0%> (ø) ⬆️
src/Xtools/User.php 76.54% <100%> (+1.87%) ⬆️
src/Xtools/EditCounter.php 53.56% <94.64%> (+18.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cced22f...9dd19f1. Read the comment docs.

@x-tools x-tools deleted a comment from codecov-io Jul 28, 2017

@MusikAnimal MusikAnimal changed the title from EditCounter: Rework month counts, horizontal bar chart to [WIP] EditCounter: Rework month counts, horizontal bar chart Jul 28, 2017

@MusikAnimal MusikAnimal changed the title from [WIP] EditCounter: Rework month counts, horizontal bar chart to EditCounter: Rework month counts, horizontal bar chart Jul 28, 2017

@MusikAnimal MusikAnimal changed the title from EditCounter: Rework month counts, horizontal bar chart to EditCounter: Rework month and year counts, horizontal bar chart Jul 28, 2017

EditCounter: Rework month and year counts, horizontal bar chart
Refactor yearCounts to use monthCounts

Only show months from registration date to present

getRegistrationDate() added to User
@MusikAnimal

This comment has been minimized.

Member

MusikAnimal commented Aug 1, 2017

Merging based on Matthew's review. Hope this OK! :)

@MusikAnimal MusikAnimal merged commit 2784d56 into master Aug 1, 2017

5 checks passed

Scrutinizer 5 new issues, 3 updated code elements
Details
codecov/patch 75.64% of diff hit (target 18.68%)
Details
codecov/project 20.41% (+1.73%) compared to cced22f
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@MusikAnimal MusikAnimal deleted the ec-month-counts branch Aug 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment