FIX: wrong negation

This commit is contained in:
Juan Pablo Vial
2025-10-24 19:32:19 -03:00
parent 04a725e517
commit ab60c9db1b

View File

@ -17,7 +17,7 @@ class Money
protected array $providers = [];
public function register(Provider $provider): Money
{
if (!in_array($provider, $this->providers)) {
if (in_array($provider, $this->providers)) {
return $this;
}
$this->providers []= $provider;