Commit 84c38d31 authored by Jan Kuchař's avatar Jan Kuchař Committed by GitHub

Merge pull request #9 from grifart/equals-accepts-only-enum

Enum::equals(): allow comparing only enum-enum instances (this preven…
parents 791dc99a eff9ee4d
Pipeline #14363 passed with stages
in 49 seconds
......@@ -125,11 +125,11 @@ abstract class Enum
* @param mixed $that the other object we are comparing to
* @param Enum $that the other object we are comparing to
* @return bool if current value equals to the other value
* If value is non-enum value, returns false (as they are also not equal).
public function equals($that): bool
public function equals(Enum $that): bool
return $this === $that;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment