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 namespace App\Listeners; use App\Events\PlaybackStarted; use App\Services\LastfmSe..

Decoded Output download

<?php

namespace App\Listeners;

use App\Events\PlaybackStarted;
use App\Services\LastfmService;
use Illuminate\Contracts\Queue\ShouldQueue;

class UpdateLastfmNowPlaying implements ShouldQueue
{
    public function __construct(private LastfmService $lastfm)
    {
    }

    public function handle(PlaybackStarted $event): void
    {
        if (!LastfmService::enabled() || !$event->user->lastfm_session_key || $event->song->artist->is_unknown) {
            return;
        }

        $this->lastfm->updateNowPlaying($event->song, $event->user);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Listeners;

use App\Events\PlaybackStarted;
use App\Services\LastfmService;
use Illuminate\Contracts\Queue\ShouldQueue;

class UpdateLastfmNowPlaying implements ShouldQueue
{
    public function __construct(private LastfmService $lastfm)
    {
    }

    public function handle(PlaybackStarted $event): void
    {
        if (!LastfmService::enabled() || !$event->user->lastfm_session_key || $event->song->artist->is_unknown) {
            return;
        }

        $this->lastfm->updateNowPlaying($event->song, $event->user);
    }
}

Function Calls

None

Variables

None

Stats

MD5 0282542978503f6a3ffc007359df721e
Eval Count 0
Decode Time 96 ms