Skip to content

Conversation

@MusikAnimal
Copy link
Member

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
Copy link
Member Author

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?

Copy link
Member

@Matthewrbowker Matthewrbowker left a comment

Choose a reason for hiding this comment

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

Looks good.

@MusikAnimal MusikAnimal force-pushed the ec-month-counts branch 3 times, most recently from a2d8ad6 to a8c4c7b Compare July 28, 2017 00:05
@codecov-io
Copy link

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.

@MusikAnimal MusikAnimal force-pushed the ec-month-counts branch 2 times, most recently from 1a606fb to ef337c8 Compare July 28, 2017 00:16
@x-tools x-tools deleted a comment from codecov-io Jul 28, 2017
@MusikAnimal MusikAnimal changed the title EditCounter: Rework month counts, horizontal bar chart [WIP] EditCounter: Rework month counts, horizontal bar chart Jul 28, 2017
@MusikAnimal MusikAnimal changed the title [WIP] EditCounter: Rework month counts, horizontal bar chart EditCounter: Rework month counts, horizontal bar chart Jul 28, 2017
@MusikAnimal MusikAnimal changed the title EditCounter: Rework month counts, horizontal bar chart EditCounter: Rework month and year counts, horizontal bar chart Jul 28, 2017
Refactor yearCounts to use monthCounts

Only show months from registration date to present

getRegistrationDate() added to User
@MusikAnimal
Copy link
Member Author

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

@MusikAnimal MusikAnimal merged commit 2784d56 into master Aug 1, 2017
@MusikAnimal MusikAnimal deleted the ec-month-counts branch August 1, 2017 21:44
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.

4 participants