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 Phug\Parser\TokenHandler; use Phug\Lexer\Token\BlockToken; use Phug\Lexe..
Decoded Output download
<?php
namespace Phug\Parser\TokenHandler;
use Phug\Lexer\Token\BlockToken;
use Phug\Lexer\TokenInterface;
use Phug\Parser\Node\BlockNode;
use Phug\Parser\State;
use Phug\Parser\TokenHandlerInterface;
class BlockTokenHandler implements TokenHandlerInterface
{
public function handleToken(TokenInterface $token, State $state)
{
if (!($token instanceof BlockToken)) {
throw new \RuntimeException(
'You can only pass block tokens to this token handler'
);
}
/** @var BlockNode $node */
$node = $state->createNode(BlockNode::class, $token);
$node->setName($token->getName());
$node->setMode($token->getMode());
$state->setCurrentNode($node);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Phug\Parser\TokenHandler;
use Phug\Lexer\Token\BlockToken;
use Phug\Lexer\TokenInterface;
use Phug\Parser\Node\BlockNode;
use Phug\Parser\State;
use Phug\Parser\TokenHandlerInterface;
class BlockTokenHandler implements TokenHandlerInterface
{
public function handleToken(TokenInterface $token, State $state)
{
if (!($token instanceof BlockToken)) {
throw new \RuntimeException(
'You can only pass block tokens to this token handler'
);
}
/** @var BlockNode $node */
$node = $state->createNode(BlockNode::class, $token);
$node->setName($token->getName());
$node->setMode($token->getMode());
$state->setCurrentNode($node);
}
}
Function Calls
None |
Stats
MD5 | 5cdffe754868a2deff710f83705070d0 |
Eval Count | 0 |
Decode Time | 78 ms |