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 the reliforp/reli-prof package. * * (c) sji <sji@sj-i..
Decoded Output download
<?php
/**
* This file is part of the reliforp/reli-prof package.
*
* (c) sji <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Reli\Inspector\Daemon\Reader\Worker;
use Amp\Sync\Channel;
use Reli\Inspector\Daemon\Reader\Protocol\Message\AttachMessage;
use Reli\Inspector\Daemon\Reader\Protocol\Message\DetachWorkerMessage;
use Reli\Inspector\Daemon\Reader\Protocol\Message\SetSettingsMessage;
use Reli\Inspector\Daemon\Reader\Protocol\Message\TraceMessage;
use Reli\Inspector\Daemon\Reader\Protocol\PhpReaderWorkerProtocolInterface;
final class PhpReaderWorkerProtocol implements PhpReaderWorkerProtocolInterface
{
public function __construct(
private Channel $channel
) {
}
public static function createFromChannel(Channel $channel): static
{
return new self($channel);
}
public function receiveSettings(): SetSettingsMessage
{
/** @var SetSettingsMessage */
return $this->channel->receive();
}
public function receiveAttach(): AttachMessage
{
/** @var AttachMessage */
return $this->channel->receive();
}
public function sendTrace(TraceMessage $message): void
{
$this->channel->send($message);
}
public function sendDetachWorker(DetachWorkerMessage $message): void
{
$this->channel->send($message);
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* This file is part of the reliforp/reli-prof package.
*
* (c) sji <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Reli\Inspector\Daemon\Reader\Worker;
use Amp\Sync\Channel;
use Reli\Inspector\Daemon\Reader\Protocol\Message\AttachMessage;
use Reli\Inspector\Daemon\Reader\Protocol\Message\DetachWorkerMessage;
use Reli\Inspector\Daemon\Reader\Protocol\Message\SetSettingsMessage;
use Reli\Inspector\Daemon\Reader\Protocol\Message\TraceMessage;
use Reli\Inspector\Daemon\Reader\Protocol\PhpReaderWorkerProtocolInterface;
final class PhpReaderWorkerProtocol implements PhpReaderWorkerProtocolInterface
{
public function __construct(
private Channel $channel
) {
}
public static function createFromChannel(Channel $channel): static
{
return new self($channel);
}
public function receiveSettings(): SetSettingsMessage
{
/** @var SetSettingsMessage */
return $this->channel->receive();
}
public function receiveAttach(): AttachMessage
{
/** @var AttachMessage */
return $this->channel->receive();
}
public function sendTrace(TraceMessage $message): void
{
$this->channel->send($message);
}
public function sendDetachWorker(DetachWorkerMessage $message): void
{
$this->channel->send($message);
}
}
Function Calls
None |
Stats
MD5 | d388969e472e2ed055254a0d18cafde6 |
Eval Count | 0 |
Decode Time | 90 ms |