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 declare(strict_types = 1); namespace LoversOfBehat\TableExtension; use Behat\Beha..
Decoded Output download
<?php
declare(strict_types = 1);
namespace LoversOfBehat\TableExtension;
use Behat\Behat\Context\Context;
use Behat\Testwork\Environment\Environment;
use Behat\Testwork\Hook\HookDispatcher;
use LoversOfBehat\TableExtension\Event\TableEventInterface;
use LoversOfBehat\TableExtension\Hook\Scope\AfterTableFetchScope;
/**
* Dispatches events using Behat's hook dispatcher.
*/
class BehatHookTableEventDispatcher implements TableEventDispatcherInterface
{
/**
* The Behat test environment.
*
* @var Environment
*/
protected $environment;
/**
* The Behat context.
*
* @var Context
*/
protected $context;
/**
* Behat's hook dispatcher.
*
* @var HookDispatcher
*/
protected $dispatcher;
/**
* Constructs a new BehatHookTableEventDispatcher.
*
* @param Environment $environment
* The Behat test environment.
* @param Context $context
* The Behat context.
* @param HookDispatcher $dispatcher
* Behat's hook dispatcher.
*/
public function __construct(Environment $environment, Context $context, HookDispatcher $dispatcher)
{
$this->environment = $environment;
$this->context = $context;
$this->dispatcher = $dispatcher;
}
/**
* {@inheritdoc}
*/
public function dispatch(TableEventInterface $event): void
{
$scope = new AfterTableFetchScope($this->environment, $this->context, $event->getHtmlContainer());
$this->dispatcher->dispatchScopeHooks($scope);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types = 1);
namespace LoversOfBehat\TableExtension;
use Behat\Behat\Context\Context;
use Behat\Testwork\Environment\Environment;
use Behat\Testwork\Hook\HookDispatcher;
use LoversOfBehat\TableExtension\Event\TableEventInterface;
use LoversOfBehat\TableExtension\Hook\Scope\AfterTableFetchScope;
/**
* Dispatches events using Behat's hook dispatcher.
*/
class BehatHookTableEventDispatcher implements TableEventDispatcherInterface
{
/**
* The Behat test environment.
*
* @var Environment
*/
protected $environment;
/**
* The Behat context.
*
* @var Context
*/
protected $context;
/**
* Behat's hook dispatcher.
*
* @var HookDispatcher
*/
protected $dispatcher;
/**
* Constructs a new BehatHookTableEventDispatcher.
*
* @param Environment $environment
* The Behat test environment.
* @param Context $context
* The Behat context.
* @param HookDispatcher $dispatcher
* Behat's hook dispatcher.
*/
public function __construct(Environment $environment, Context $context, HookDispatcher $dispatcher)
{
$this->environment = $environment;
$this->context = $context;
$this->dispatcher = $dispatcher;
}
/**
* {@inheritdoc}
*/
public function dispatch(TableEventInterface $event): void
{
$scope = new AfterTableFetchScope($this->environment, $this->context, $event->getHtmlContainer());
$this->dispatcher->dispatchScopeHooks($scope);
}
}
Function Calls
None |
Stats
MD5 | ab935af12445692a551c2a9dc44da1ff |
Eval Count | 0 |
Decode Time | 115 ms |