Cost calculation unification, more tests
Details
- Reviewers
mollekopf - Group Reviewers
Restricted Project - Commits
- rK7cf045ae80e9: Asynchronous charging of deleted entitlements
./phpunit
Diff Detail
- Repository
- rK kolab
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/app/Observers/EntitlementObserver.php | ||
---|---|---|
82 | So you think this is here to trigger an update job via the listener? Could be, it was added here: 66f0930de7bb3db29a5ead4148c96b3f38f8d370 (for ldap backend support) This deserves at least a comment though, it's a very in-transparent way to trigger an update job. | |
src/app/Wallet.php | ||
120 | Degraded pays nothing makes sense, the rest of the sentence I don't understand. | |
127 | Seems like we can end up with negative profit here? $cost - $fee should probably be at minimum 0? | |
591 | Avoid string interpolation for methods if possible. I know, personal preference, but IMO there are only very few places where obscuring which function you are calling and making it inaccessible to tools really is a good trade off. | |
674 | Seems good enough from my POV. |
src/app/Observers/EntitlementObserver.php | ||
---|---|---|
82 | I think this is a circumvention for the bubbling of an \App\User::delete() on to its individual \App\User::entitlements() getting deleted in its observer. |
src/app/Wallet.php | ||
---|---|---|
120 | Yes, we always get money from the tenant. |
src/app/Wallet.php | ||
---|---|---|
120 | Customer pays nothing, but see $profit. We get the fee from the tenant. |