<commit_before><?php
/**
 * Nooku Platform - http://www.nooku.org/platform
 *
 * @copyright	Copyright (C) 2011 - 2014 Johan Janssens 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
 */

use Nooku\Library;

/**
 * Users Session Activity
 *
 * @author  <NAME> <http://github.com/amazeika>
 * @package Component\Users
 */
class UsersActivitySession extends ActivitiesModelEntityActivity
{
    protected function _initialize(Library\ObjectConfig $config)
    {
        $config->append(array('format' => '{actor} {action} {application}', 'objects' => array('application')));
        parent::_initialize($config);
    }

    public function getActivityApplication()
    {
        return $this->_getObject(array('objectName' => $this->application));
    }

    public function getPropertyImage()
    {
        $images = array('add' => 'user', 'delete' => 'off');

        if (isset($images[$this->action])) {
            $image = $images[$this->action];
        }
        else $image = parent::getPropertyImage();

        return $image;
    }
}<commit_msg>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
 */

use Nooku\Library;

/**
 * Users Session Activity
 *
 * @author  <NAME> <http://github.com/amazeika>
 * @package Component\Users
 */
class UsersActivitySession extends ActivitiesModelEntityActivity
{
    protected function _initialize(Library\ObjectConfig $config)
    {
        $config->append(array(
            'format' => '{actor} {action} {application}',
            'objects' => array('application')
        ));

        parent::_initialize($config);
    }

    public function getActivityApplication()
    {
        return $this->_getObject(array('objectName' => $this->application));
    }

    public function getPropertyImage()
    {
        $images = array('add' => 'user', 'delete' => 'off');

        if (isset($images[$this->action])) {
            $image = $images[$this->action];
        } else {
            $image = parent::getPropertyImage();
        }

        return $image;
    }
}
{'fraction_non_alphanumeric': 0.15841584158415842, 'fraction_numerical': 0.007425742574257425, 'mean_word_length': 2.9884868421052633, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 30, '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': '6609879', 'n_tokens_mistral': 743, 'n_tokens_neox': 717, 'n_words': 149}