<commit_before><?php

namespace Utility;

use Utility\Collection;
use Utility\Segment;
use Utility\Point;

/**
* polygone
*/
class Polygone implements PolygonInterface {

	private $segments;

	public function __construct(array $pointsListe) {
		$this->segments = new Collection();

		foreach ($pointsListe as $pointA) {
			$pointB = next($pointsListe);

			if ($pointB) {
				$pointA = new Point($pointA);
				$pointB = new Point($pointB);
				$this->segments[] = new Segment($pointA, $pointB);
			}
			unset($pointA, $pointB);
		}
	}

	function __clone()
	{
		$this->segments = clone $this->segments;
	}

	public function toJSON() {
		$json = "";
		foreach ($this->segments as $segment) {
			$json .= $segment->getPointA()->toJSON();
			$json .= ",";
		}
		$json .= $this->segments[0]->getPointA()->toJSON();
		return "[".$json."]";<commit_msg>[BUG] Add the visibility of a method.<commit_after><?php

namespace Utility;

use Utility\Collection;
use Utility\Segment;
use Utility\Point;

/**
* polygone
*/
class Polygone implements PolygonInterface {

	private $segments;

	public function __construct(array $pointsListe) {
		$this->segments = new Collection();

		foreach ($pointsListe as $pointA) {
			$pointB = next($pointsListe);

			if ($pointB) {
				$pointA = new Point($pointA);
				$pointB = new Point($pointB);
				$this->segments[] = new Segment($pointA, $pointB);
			}
			unset($pointA, $pointB);
		}
	}

	public function __clone()
	{
		$this->segments = clone $this->segments;
	}

	public function toJSON() {
		$json = "";
		foreach ($this->segments as $segment) {
			$json .= $segment->getPointA()->toJSON();
			$json .= ",";
		}
		$json .= $this->segments[0]->getPointA()->toJSON();
		return "[".$json."]";
{'fraction_non_alphanumeric': 0.1818710052295177, 'fraction_numerical': 0.0011621150493898896, 'mean_word_length': 3.850704225352113, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '1941020', 'n_tokens_mistral': 672, 'n_tokens_neox': 592, 'n_words': 132}