Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* * This file is part of Flarum. * * For detailed copyright and license informa..

Decoded Output download

<?php

/*
 * This file is part of Flarum.
 *
 * For detailed copyright and license information, please view the
 * LICENSE file that was distributed with this source code.
 */

namespace Flarum\Akismet\Listener;

use Flarum\Akismet\Akismet;
use Flarum\Approval\Event\PostWasApproved;

class SubmitHam
{
    public function __construct(
        protected Akismet $akismet
    ) {
    }

    public function handle(PostWasApproved $event): void
    {
        if (! $this->akismet->isConfigured()) {
            return;
        }

        $post = $event->post;

        if ($post->is_spam) {
            $this->akismet
                ->withContent($post->content)
                ->withIp($post->ip_address)
                ->withAuthorName($post->user->username)
                ->withAuthorEmail($post->user->email)
                ->withType($post->number === 1 ? 'forum-post' : 'reply')
                ->submitHam();
        }
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

/*
 * This file is part of Flarum.
 *
 * For detailed copyright and license information, please view the
 * LICENSE file that was distributed with this source code.
 */

namespace Flarum\Akismet\Listener;

use Flarum\Akismet\Akismet;
use Flarum\Approval\Event\PostWasApproved;

class SubmitHam
{
    public function __construct(
        protected Akismet $akismet
    ) {
    }

    public function handle(PostWasApproved $event): void
    {
        if (! $this->akismet->isConfigured()) {
            return;
        }

        $post = $event->post;

        if ($post->is_spam) {
            $this->akismet
                ->withContent($post->content)
                ->withIp($post->ip_address)
                ->withAuthorName($post->user->username)
                ->withAuthorEmail($post->user->email)
                ->withType($post->number === 1 ? 'forum-post' : 'reply')
                ->submitHam();
        }
    }
}

Function Calls

None

Variables

None

Stats

MD5 e5ff0ca9c80dc68d54402accc1b6c887
Eval Count 0
Decode Time 179 ms