brick / money

A money and currency library for PHP
MIT License
1.65k stars 102 forks source link

Add methods to check if money is not equal #78

Closed gdebrauwer closed 1 year ago

gdebrauwer commented 1 year ago

When you want to check that 2 money objects are not the same, you currently have to do:

! $firstMoney->isEqualTo($secondMoney);

This PR adds a reverse method that makes this more readable:

$firstMoney->isNotEqualTo($secondMoney);
BenMorel commented 1 year ago

Hi, I’m sorry bit I see no point in adding this!

! $firstMoney->isEqualTo($secondMoney);

is perfectly fine to me!