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
Unknown Object (File)
Mon, May 13, 9:28 PM
Unknown Object (File)
Sat, Apr 27, 12:29 AM
Unknown Object (File)
Thu, Apr 25, 10:57 AM
Unknown Object (File)
Fri, Apr 19, 7:06 PM
Unknown Object (File)
Apr 8 2024, 4:43 PM
Unknown Object (File)
Mar 29 2024, 8:55 AM
Unknown Object (File)
Mar 28 2024, 10:22 AM
Unknown Object (File)
Mar 28 2024, 9:36 AM
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
Branch
dev/entitlement-delete-cost-fix
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 30910
Build 11509: arc lint + arc unit

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.