public static function areEqual($value1, $value2): bool
    {
        if (static::isEquatable($value1) && static::areSameType($value1, $value2)) {
            return $value1->equals($value2);
        }

        return $value1 == $value2;
    }
public static function areEqual($value1, $value2): bool
    {
        if (static::isEquatable($value1) && static::areSameType($value1, $value2)) {
            return $value1->equals($value2);
        }

        return $value1 == $value2;
    }
public static function areEqual ( $ value1 , $ value2 ) : bool { if ( static :: isEquatable ( $ value1 ) && static :: areSameType ( $ value1 , $ value2 ) ) { return $ value1 -> equals ( $ value2 ) ; } return $ value1 == $ value2 ; }
Checks if two values are equal

@param mixed $value1 The first value
@param mixed $value2 The second value

@return bool
Checks if two values are equal