<commit_before><?php

namespace JeroenDesloovere\SocialMedia\Objects;

/*
 * This file is part of the Social Pushing from <NAME>.
 *
 * For the full copyright and license information, please view the license
 * file that was distributed with this source code.
 */

use JeroenDesloovere\SocialMedia\Objects\TimelinePost as TimelinePost;

/**
 * Social Media
 *
 * Wrapper to do all the social media publishing/unpublishing actions.
 *
 * @author <NAME> <<EMAIL>>
 */
class TimelineResult
{
    /**
     * Action
     *
     * @var string
     */
    protected $action;

    /**
     * Result
     *
     * @var array
     */
    protected $result;

    /**
     * @var TimelinePost
     */
    protected $timelinePost;

    /**
     * Construct
     *
     * @param Service $service
     * @param Post $post
     */   
    public function __construct(
        TimelinePost $post,
        $action
    ) {
        $this->setAction($action);
        $this->setTimelinePost($post);
        $this->setResult();
    }

    /**
     * Get action
     *
     * @return string
     */
    public function getAction()
    {
        return $this->action;
    }

    /**
     * Get timeline post
     *
     * @return TimelinePost
     */
    public function getTimelinePost()
    {
        return $this->timelinePost;
    }

    /**
     * Set action
     *
     * @param string
     */
    public function setAction($action)
    {
        $this->action = $action;
    }

    /**
     * Set result
     */
    public function setResult()
    {
        // define variables
        $timelinePost = $this->getTimelinePost();
        $service = $timelinePost->getService();
        $post = $timelinePost->getPost();

        $this->result = $service->{$this->getAction()}($post);
    }

    /**
     * Set timeline post
     *
     * @param TimelinePost $timelinePost
     */
    public function setTimelinePost(TimelinePost $timelinePost)
    {
        $this->timelinePost = $post;
    }<commit_msg>bugfix in timelinepost<commit_after><?php

namespace JeroenDesloovere\SocialMedia\Objects;

/*
 * This file is part of the Social Pushing from <NAME>.
 *
 * For the full copyright and license information, please view the license
 * file that was distributed with this source code.
 */

use JeroenDesloovere\SocialMedia\Objects\TimelinePost as TimelinePost;

/**
 * Social Media
 *
 * Wrapper to do all the social media publishing/unpublishing actions.
 *
 * @author <NAME> <<EMAIL>>
 */
class TimelineResult
{
    /**
     * Action
     *
     * @var string
     */
    protected $action;

    /**
     * Result
     *
     * @var array
     */
    protected $result;

    /**
     * @var TimelinePost
     */
    protected $timelinePost;

    /**
     * Construct
     *
     * @param Service $service
     * @param Post $post
     */   
    public function __construct(
        TimelinePost $post,
        $action
    ) {
        $this->setAction($action);
        $this->setTimelinePost($post);
        $this->setResult();
    }

    /**
     * Get action
     *
     * @return string
     */
    public function getAction()
    {
        return $this->action;
    }

    /**
     * Get timeline post
     *
     * @return TimelinePost
     */
    public function getTimelinePost()
    {
        return $this->timelinePost;
    }

    /**
     * Set action
     *
     * @param string
     */
    public function setAction($action)
    {
        $this->action = $action;
    }

    /**
     * Set result
     */
    public function setResult()
    {
        // define variables
        $timelinePost = $this->getTimelinePost();
        $service = $timelinePost->getService();
        $post = $timelinePost->getPost();

        $this->result = $service->{$this->getAction()}($post);
    }

    /**
     * Set timeline post
     *
     * @param TimelinePost $timelinePost
     */
    public function setTimelinePost(TimelinePost $timelinePost)
    {
        $this->timelinePost = $timelinePost;
    }
{'fraction_non_alphanumeric': 0.12296110414052698, 'fraction_numerical': 0.0, 'mean_word_length': 1.9158741770299927, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 37, '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': '6863288', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1183, 'n_words': 276}