<commit_before><?php


namespace Breeze\Service;


use Breeze\Repository\Mood as MoodRepository $moodRepository;

class Mood extends Base
{
	public function __construct(MoodRepository $moodRepository)
	{
	}

	public function displayMood(array &$data, int $userId): void
	{
		if (!$this['tools']->enable('master') || !$this['tools']->enable('mood'))
			return;

		// Append the result to the custom fields array.
		$data['custom_fields'][] =  $this['mood']->show($user);
	}

	public function moodProfile($memID, $area): void
	{
		// Don't do anything if the mod is off
		if (!$this['tools']->enable('master'))
			return;

		// Let BreezeMood handle this...
		$this['mood']->showProfile($memID, $area);
	}
}<commit_msg>feat: MoodService::displayMood()<commit_after><?php


namespace Breeze\Service;


use Breeze\Repository\Mood as MoodRepository;

class Mood extends Base
{
	/**
	 * @var MoodRepository
	 */
	protected $moodRepository;

	/**
	 * @var Settings
	 */
	protected $settings;

	public function __construct(MoodRepository $moodRepository, Settings $settings)
	{
		$this->moodRepository = $moodRepository;
		$this->settings = $settings;
	}

	public function displayMood(array &$data, int $userId): void
	{
		if (!$this->settings->enable('master') || !$this->settings->enable('mood'))
			return;

		$data['custom_fields'][] =  $this->moodRepository->getMood($userId);
	}

	public function moodProfile($memID, $area): void
	{
		// Don't do anything if the mod is off
		if (!$this['tools']->enable('master'))
			return;

		// Let BreezeMood handle this...
		$this['mood']->showProfile($memID, $area);
	}
}
{'fraction_non_alphanumeric': 0.16842759477936606, 'fraction_numerical': 0.0, 'mean_word_length': 4.513698630136986, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, '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': '4098553', 'n_tokens_mistral': 577, 'n_tokens_neox': 534, 'n_words': 124}