<commit_before><?php

namespace Brick\Geo;

/**
 * A MultiPoint is a 0-dimensional GeometryCollection. The elements of a MultiPoint are restricted to Points.
 *
 * The Points are not connected or ordered in any semantically important way
 * (see the discussion at GeometryCollection). A MultiPoint is simple if no two Points in the MultiPoint are equal
 * (have identical coordinate values in X and Y).
 *
 * The boundary of a MultiPoint is the empty set.
 */
class MultiPoint extends GeometryCollection
{
    /**
     * @noproxy
     *
     * {@inheritdoc}
     */
    public function geometryType()
    {
        return 'MultiPoint';
    }

    /**
     * {@inheritdoc}
     */
    protected static function containedGeometryType()
    {
        return Point::class;
    }
}<commit_msg>Implemented MultiPoint::isSimple() in PHP<commit_after><?php

namespace Brick\Geo;

/**
 * A MultiPoint is a 0-dimensional GeometryCollection. The elements of a MultiPoint are restricted to Points.
 *
 * The Points are not connected or ordered in any semantically important way
 * (see the discussion at GeometryCollection). A MultiPoint is simple if no two Points in the MultiPoint are equal
 * (have identical coordinate values in X and Y).
 *
 * The boundary of a MultiPoint is the empty set.
 */
class MultiPoint extends GeometryCollection
{
    /**
     * @noproxy
     *
     * {@inheritdoc}
     */
    public function geometryType()
    {
        return 'MultiPoint';
    }

    /**
     * {@inheritdoc}
     */
    protected static function containedGeometryType()
    {
        return Point::class;
    }

    /**
     * {@inheritdoc}
     *
     * A MultiPoint is simple if it has no repeated points.
     *
     * Only X and Y coordinates are compared when checking for repeated points.
     */
    public function isSimple()
    {
        $count = count($this->geometries);

        for ($i = 0; $i < $count; $i++) {
            /** @var Point $a */
            $a = $this->geometries[$i];

            for ($j = $i + 1; $j < $count; $j++) {
                /** @var Point $b */
                $b = $this->geometries[$j];

                if ($a->x() === $b->x() && $a->y() === $b->y()) {
                    return false;
                }
            }
        }

        return true;
    }
}
{'fraction_non_alphanumeric': 0.11280487804878049, 'fraction_numerical': 0.0017421602787456446, 'mean_word_length': 2.1124661246612466, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7176878', 'n_tokens_mistral': 653, 'n_tokens_neox': 627, 'n_words': 229}