<commit_before><?php
	namespace REST\RESTModel;

	class Articles implements \REST\Interfaces\RESTModelAdapter
	{
		public function __construct()
		{
		}

		public function get(int $id = null)
		{
			if (!is_null($id))
				return "Article number $id";
			return "All articles";
		}

		public function put(int $id = null, array $params)
		{
			if (is_null($id)) {
				return $this->post($params);
			} else {
				return "putting into $id next params: " . implode(', ', $params);
			}
		}

		public function post(array $params)
		{
			return 'posting new article with params: ' . implode(', ', $params);
		}

		public function del(int $id = null)
		{
			if (is_null($id))
				return "removing article number $id";
			else
				return "removing all articles";
		}
	}<commit_msg>REST :  Articles. Patched post() method, added default value to $params<commit_after><?php
	namespace REST\RESTModel;

	class Articles implements \REST\Interfaces\RESTModelAdapter
	{
		public function __construct()
		{
		}

		public function get(int $id = null)
		{
			if (!is_null($id))
				return "Article number $id";
			return "All articles";
		}

		public function put(int $id = null, array $params = null)
		{
			if (is_null($id)) {
				return $this->post($params);
			} else {
				return "putting into $id next params: " . implode(', ', $params);
			}
		}

		public function post(array $params = null)
		{
			if (is_null($params))
				throw new \Exception('RESTModel :  no params specified' . PHP_EOL);
			else
				return 'posting new article with params: ' . implode(', ', $params);
		}

		public function del(int $id = null)
		{
			if (is_null($id))
				return "removing article number $id";
			else
				return "removing all articles";
		}
	}
{'fraction_non_alphanumeric': 0.13631090487238978, 'fraction_numerical': 0.0, 'mean_word_length': 3.1366906474820144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4082313', 'n_tokens_mistral': 690, 'n_tokens_neox': 566, 'n_words': 167}