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 App\Services; use GuzzleHttp\Client; use Illuminate\Contracts\Cache\Repo..
Decoded Output download
<?php
namespace App\Services;
use GuzzleHttp\Client;
use Illuminate\Contracts\Cache\Repository as Cache;
class ApplicationInformationService
{
public function __construct(private Client $client, private Cache $cache)
{
}
/**
* Get the latest version number of Koel from GitHub.
*/
public function getLatestVersionNumber(): string
{
return attempt(function () {
return $this->cache->remember('latestKoelVersion', now()->addDay(), function (): string {
return json_decode($this->client->get('https://api.github.com/repos/koel/koel/tags')->getBody())[0]
->name;
});
}) ?? koel_version();
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace App\Services;
use GuzzleHttp\Client;
use Illuminate\Contracts\Cache\Repository as Cache;
class ApplicationInformationService
{
public function __construct(private Client $client, private Cache $cache)
{
}
/**
* Get the latest version number of Koel from GitHub.
*/
public function getLatestVersionNumber(): string
{
return attempt(function () {
return $this->cache->remember('latestKoelVersion', now()->addDay(), function (): string {
return json_decode($this->client->get('https://api.github.com/repos/koel/koel/tags')->getBody())[0]
->name;
});
}) ?? koel_version();
}
}
Function Calls
| None |
Stats
| MD5 | 8681b7978ae7f002dbaa5e72e3496f8c |
| Eval Count | 0 |
| Decode Time | 100 ms |