Page MenuHomePhorge

Improve cost calculation on entitlement delete and test
ClosedPublic

Authored by machniak on Sep 22 2020, 4:06 PM.
Tags
None
Referenced Files
F11585001: D1630.id.diff
Thu, Mar 28, 10:22 AM
F11584824: D1630.id4309.diff
Thu, Mar 28, 9:36 AM
Unknown Object (File)
Feb 25 2024, 2:06 PM
Unknown Object (File)
Feb 19 2024, 9:48 AM
Unknown Object (File)
Feb 14 2024, 2:35 PM
Unknown Object (File)
Feb 10 2024, 1:46 PM
Unknown Object (File)
Jan 27 2024, 9:56 PM
Unknown Object (File)
Jan 20 2024, 12:38 PM
Subscribers
Restricted Project

Details

Reviewers
vanmeeuwen
Group Reviewers
Restricted Project
Commits
rKd7f6cebed76f: Improve cost calculation on entitlement delete and test
Summary

While adding test for T375530 I found that cost calculation
could be improved. Especially existence of unsused variable $dayOfThisMonth suggested that.

So, I changed the code to calculate price per day using current month
if diff in days does not overlap with the previous month.

I still think it should be simplified to use number 30 instead of the number of days in a month.

Test Plan

./phpunit

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

machniak created this revision.
This revision is now accepted and ready to land.Sep 23 2020, 11:34 AM
This revision was automatically updated to reflect the committed changes.