src/Constraint/In.php
public function equivalentTo(Expression $other)
    {
        if (1 === count($this->acceptedValues)) {
            // In is logically equivalent to Same if strict and only one value
            if ($this->strict && $other instanceof Same) {
                return reset($this->acceptedValues) === $other->getComparedValue();
            }

            // In is logically equivalent to Equals if not strict and only one value
            if (!$this->strict && $other instanceof Equals) {
                return reset($this->acceptedValues) == $other->getComparedValue();
            }
        }

        // Since this class is final, we can check with instanceof
        if (!$other instanceof $this) {
            return false;
        }

        if ($this->strict !== $other->strict) {
            return false;
        }

        if (!$this->strict) {
            return $this->acceptedValues == $other->acceptedValues;
        }

        $acceptedValuesLeft = $this->acceptedValues;
        $acceptedValuesRight = $other->acceptedValues;

        // Ignore order
        sort($acceptedValuesLeft);
        sort($acceptedValuesRight);

        return $acceptedValuesLeft === $acceptedValuesRight;
    }
public function equivalentTo(Expression $other)
    {
        if (1 === count($this->acceptedValues)) {
            // In is logically equivalent to Same if strict and only one value
            if ($this->strict && $other instanceof Same) {
                return reset($this->acceptedValues) === $other->getComparedValue();
            }

            // In is logically equivalent to Equals if not strict and only one value
            if (!$this->strict && $other instanceof Equals) {
                return reset($this->acceptedValues) == $other->getComparedValue();
            }
        }

        // Since this class is final, we can check with instanceof
        if (!$other instanceof $this) {
            return false;
        }

        if ($this->strict !== $other->strict) {
            return false;
        }

        if (!$this->strict) {
            return $this->acceptedValues == $other->acceptedValues;
        }

        $acceptedValuesLeft = $this->acceptedValues;
        $acceptedValuesRight = $other->acceptedValues;

        // Ignore order
        sort($acceptedValuesLeft);
        sort($acceptedValuesRight);

        return $acceptedValuesLeft === $acceptedValuesRight;
    }
{@inheritdoc}