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 Pest\Plugins; use Pest\Contracts\Plugins\Termi..
Decoded Output download
<?php
declare(strict_types=1);
namespace Pest\Plugins;
use Pest\Contracts\Plugins\Terminable;
use Pest\PendingCalls\TestCall;
/**
* @internal
*/
final class Only implements Terminable
{
/**
* The temporary folder.
*/
private const TEMPORARY_FOLDER = __DIR__
.DIRECTORY_SEPARATOR
.'..'
.DIRECTORY_SEPARATOR
.'..'
.DIRECTORY_SEPARATOR
.'.temp';
/**
* {@inheritDoc}
*/
public function terminate(): void
{
$lockFile = self::TEMPORARY_FOLDER.DIRECTORY_SEPARATOR.'only.lock';
if (file_exists($lockFile)) {
unlink($lockFile);
}
}
/**
* Creates the lock file.
*/
public static function enable(TestCall $testCall): void
{
if (Environment::name() == Environment::CI) {
return;
}
$testCall->group('__pest_only');
$lockFile = self::TEMPORARY_FOLDER.DIRECTORY_SEPARATOR.'only.lock';
if (! file_exists($lockFile)) {
touch($lockFile);
}
}
/**
* Checks if "only" mode is enabled.
*/
public static function isEnabled(): bool
{
$lockFile = self::TEMPORARY_FOLDER.DIRECTORY_SEPARATOR.'only.lock';
return file_exists($lockFile);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Pest\Plugins;
use Pest\Contracts\Plugins\Terminable;
use Pest\PendingCalls\TestCall;
/**
* @internal
*/
final class Only implements Terminable
{
/**
* The temporary folder.
*/
private const TEMPORARY_FOLDER = __DIR__
.DIRECTORY_SEPARATOR
.'..'
.DIRECTORY_SEPARATOR
.'..'
.DIRECTORY_SEPARATOR
.'.temp';
/**
* {@inheritDoc}
*/
public function terminate(): void
{
$lockFile = self::TEMPORARY_FOLDER.DIRECTORY_SEPARATOR.'only.lock';
if (file_exists($lockFile)) {
unlink($lockFile);
}
}
/**
* Creates the lock file.
*/
public static function enable(TestCall $testCall): void
{
if (Environment::name() == Environment::CI) {
return;
}
$testCall->group('__pest_only');
$lockFile = self::TEMPORARY_FOLDER.DIRECTORY_SEPARATOR.'only.lock';
if (! file_exists($lockFile)) {
touch($lockFile);
}
}
/**
* Checks if "only" mode is enabled.
*/
public static function isEnabled(): bool
{
$lockFile = self::TEMPORARY_FOLDER.DIRECTORY_SEPARATOR.'only.lock';
return file_exists($lockFile);
}
}
Function Calls
None |
Stats
MD5 | 4c95ba92899a04e79c6f0ac2b2538fdb |
Eval Count | 0 |
Decode Time | 78 ms |