<commit_before><?php namespace MicheleAngioni\MessageBoard\Transformers;

use League\Fractal\TransformerAbstract;
use MicheleAngioni\MessageBoard\Models\Notification;

class NotificationTransformer extends TransformerAbstract
{
    /**
     * Turn input Player model into a generic array
     *
     * @param  Notification  $notification
     * @return array
     */
    public function transform(Notification $notification)
    {
        return [
            'id' => (int)$notification->getKey(),
            'fromId' => (int)$notification->getFromId(),
            'fromType' => $notification->getFromType(),
            'toId' => (int)$notification->getToId(),
            'type' => $notification->getType(),
            'text' => $notification->getText(),
            'picUrl' => $notification->getPicUrl(),
            'extra' => $notification->getExtra(),
            'isRead' => $notification->isRead(),
            'cleanText' => $notification->getCleanText(),
            'createdAt' => (string)$notification->getCreatedAt()
        ];
    }

}<commit_msg>Added url property to Notification API json data<commit_after><?php namespace MicheleAngioni\MessageBoard\Transformers;

use League\Fractal\TransformerAbstract;
use MicheleAngioni\MessageBoard\Models\Notification;

class NotificationTransformer extends TransformerAbstract
{
    /**
     * Turn input Player model into a generic array
     *
     * @param  Notification  $notification
     * @return array
     */
    public function transform(Notification $notification)
    {
        return [
            'id' => (int)$notification->getKey(),
            'fromId' => (int)$notification->getFromId(),
            'fromType' => $notification->getFromType(),
            'toId' => (int)$notification->getToId(),
            'type' => $notification->getType(),
            'text' => $notification->getText(),
            'picUrl' => $notification->getPicUrl(),
            'url' => $notification->getUrl(),
            'extra' => $notification->getExtra(),
            'isRead' => $notification->isRead(),
            'cleanText' => $notification->getCleanText(),
            'createdAt' => (string)$notification->getCreatedAt()
        ];
    }

}
{'fraction_non_alphanumeric': 0.14382632293080055, 'fraction_numerical': 0.0, 'mean_word_length': 2.698996655518395, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 49, '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': '4155714', 'n_tokens_mistral': 571, 'n_tokens_neox': 568, 'n_words': 111}