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 Filament\Support\Assets; use Composer\InstalledVersions; use Throwable; ..
Decoded Output download
<?php
namespace Filament\Support\Assets;
use Composer\InstalledVersions;
use Throwable;
abstract class Asset
{
protected string $id;
protected bool $isLoadedOnRequest = false;
protected string $package;
protected ?string $path = null;
final public function __construct(string $id, ?string $path = null)
{
$this->id = $id;
$this->path = $path;
}
public static function make(string $id, ?string $path = null): static
{
return app(static::class, ['id' => $id, 'path' => $path]);
}
public function loadedOnRequest(bool $condition = true): static
{
$this->isLoadedOnRequest = $condition;
return $this;
}
public function getId(): string
{
return $this->id;
}
public function package(string $package): static
{
$this->package = $package;
return $this;
}
public function getPackage(): string
{
return $this->package;
}
public function getPath(): string
{
return $this->path;
}
public function isRemote(): bool
{
return str($this->getPath())->startsWith(['http://', 'https://', '//']);
}
public function getVersion(): string
{
try {
return InstalledVersions::getVersion($this->getPackage());
} catch (Throwable $exception) {
return InstalledVersions::getVersion('filament/support');
}
}
public function isLoadedOnRequest(): bool
{
return $this->isLoadedOnRequest;
}
abstract public function getPublicPath(): string;
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Filament\Support\Assets;
use Composer\InstalledVersions;
use Throwable;
abstract class Asset
{
protected string $id;
protected bool $isLoadedOnRequest = false;
protected string $package;
protected ?string $path = null;
final public function __construct(string $id, ?string $path = null)
{
$this->id = $id;
$this->path = $path;
}
public static function make(string $id, ?string $path = null): static
{
return app(static::class, ['id' => $id, 'path' => $path]);
}
public function loadedOnRequest(bool $condition = true): static
{
$this->isLoadedOnRequest = $condition;
return $this;
}
public function getId(): string
{
return $this->id;
}
public function package(string $package): static
{
$this->package = $package;
return $this;
}
public function getPackage(): string
{
return $this->package;
}
public function getPath(): string
{
return $this->path;
}
public function isRemote(): bool
{
return str($this->getPath())->startsWith(['http://', 'https://', '//']);
}
public function getVersion(): string
{
try {
return InstalledVersions::getVersion($this->getPackage());
} catch (Throwable $exception) {
return InstalledVersions::getVersion('filament/support');
}
}
public function isLoadedOnRequest(): bool
{
return $this->isLoadedOnRequest;
}
abstract public function getPublicPath(): string;
}
Function Calls
None |
Stats
MD5 | a627734b9516a7c813a8ca7892b69388 |
Eval Count | 0 |
Decode Time | 124 ms |