<commit_before><?php
/**
 * Nooku Platform - http://www.nooku.org/platform
 *
 * @copyright	Copyright (C) 2011 - 2014 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		https://github.com/nooku/nooku-platform for the canonical source repository
 */

namespace Nooku\Component\Comments;

use Nooku\Library;

/**
 * Commentable Controller Behavior
 *
 * @author  <NAME> <http://github.com/stevenrombauts>
 * @package Nooku\Component\Comments
 */
class DatabaseBehaviorCommentable extends Library\DatabaseBehaviorAbstract
{
    /**
     * Initializes the options for the object
     *
     * Called from {@link __construct()} as a first step of object instantiation.
     *
     * @param  Library\ObjectConfig $config A ObjectConfig object with configuration options
     * @return void
     */
    protected function _initialize(Library\ObjectConfig $config)
    {
        $config->append(array(
            'auto_mixin' => true
        ));

        parent::_initialize($config);
    }

    /**
	 * Get a list of comments
	 *
	 * @return Library\ModelEntityInterface
	 */
	public function getComments()
	{
		$comments = $this->getObject('com:comments.model.comments')
					->row($this->id)
					->table($this->getTable()->getName())
					->fetch();

		return $comments;
	}
}<commit_msg>re #444 - Code cleanup<commit_after><?php
/**
 * Nooku Platform - http://www.nooku.org/platform
 *
 * @copyright	Copyright (C) 2011 - 2014 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link		https://github.com/nooku/nooku-platform for the canonical source repository
 */

namespace Nooku\Component\Comments;

use Nooku\Library;

/**
 * Commentable Controller Behavior
 *
 * @author  <NAME> <http://github.com/stevenrombauts>
 * @package Nooku\Component\Comments
 */
class DatabaseBehaviorCommentable extends Library\DatabaseBehaviorAbstract
{
    /**
	 * Get a list of comments
	 *
	 * @return Library\ModelEntityInterface
	 */
	public function getComments()
	{
		$comments = $this->getObject('com:comments.model.comments')
					->row($this->id)
					->table($this->getTable()->getName())
					->fetch();

		return $comments;
	}
}
{'fraction_non_alphanumeric': 0.14349178143047533, 'fraction_numerical': 0.009329187027987561, 'mean_word_length': 3.330769230769231, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 27, 'https://': 2, 'lorem ipsum': 0, 'www.': 6, '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': '7654754', 'n_tokens_mistral': 763, 'n_tokens_neox': 692, 'n_words': 155}