FIX: wrong negation
This commit is contained in:
@ -17,7 +17,7 @@ class Money
|
|||||||
protected array $providers = [];
|
protected array $providers = [];
|
||||||
public function register(Provider $provider): Money
|
public function register(Provider $provider): Money
|
||||||
{
|
{
|
||||||
if (!in_array($provider, $this->providers)) {
|
if (in_array($provider, $this->providers)) {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
$this->providers []= $provider;
|
$this->providers []= $provider;
|
||||||
|
|||||||
Reference in New Issue
Block a user