<commit_before><?php
	namespace Bolt;

	use ReflectionClass;
	use ReflectionMethod;

	abstract class Controller extends Base
	{
		public function __toString()
		{
			return "API Object: " . $this->className();
		}

		public function patchData($model, $parameters)
		{
			foreach ($parameters as $key => $value)
			{
				if (is_scalar($value) || $value === null)
				{
					$model->$key($value);
				}
				else
				{
					$model->$key = $this->patchData($model->$key, $value);
				}
			}

			return $model;
		}

		protected function endpoints()
		{
			$class = new ReflectionClass($this->className(true));
			$allMethods = $class->getMethods(ReflectionMethod::IS_PUBLIC);

			$methods = array();

			foreach ($allMethods as $next)
			{
				if ($next->name[0] == "_")
				{
					continue;
				}

				$methods[] = strtoupper($next->name);
			}<commit_msg>Make endpoints method public<commit_after><?php
	namespace Bolt;

	use ReflectionClass;
	use ReflectionMethod;

	abstract class Controller extends Base
	{
		public function __toString()
		{
			return "API Object: " . $this->className();
		}

		public function patchData($model, $parameters)
		{
			foreach ($parameters as $key => $value)
			{
				if (is_scalar($value) || $value === null)
				{
					$model->$key($value);
				}
				else
				{
					$model->$key = $this->patchData($model->$key, $value);
				}
			}

			return $model;
		}

		public function endpoints()
		{
			$class = new ReflectionClass($this->className(true));
			$allMethods = $class->getMethods(ReflectionMethod::IS_PUBLIC);

			$methods = array();

			foreach ($allMethods as $next)
			{
				if ($next->name[0] == "_")
				{
					continue;
				}

				$methods[] = strtoupper($next->name);
			}
{'fraction_non_alphanumeric': 0.16200466200466201, 'fraction_numerical': 0.0011655011655011655, 'mean_word_length': 3.0116822429906542, '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': '612755', 'n_tokens_mistral': 723, 'n_tokens_neox': 558, 'n_words': 119}