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 Orion\ValueObjects\Specs; use Illuminate\Contr..
Decoded Output download
<?php
declare(strict_types=1);
namespace Orion\ValueObjects\Specs;
use Illuminate\Contracts\Support\Arrayable;
class Operation implements Arrayable
{
/** @var string */
public $id;
/** @var string */
public $method;
/** @var array */
public $parameters;
/** @var string */
public $summary;
/** @var Request|null */
public $request;
/** @var Response[] */
public $responses;
/** @var string[] */
public $tags;
public function toArray(): array
{
$operation = [
'parameters' => $this->parameters,
'summary' => $this->summary,
'responses' => collect($this->responses)->mapWithKeys(
function (Response $response) {
return [(string)$response->statusCode => $response->toArray()];
}
)->toArray(),
'tags' => $this->tags
];
if ($this->request) {
$operation['requestBody'] = $this->request->toArray();
}
ksort($operation);
return $operation;
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Orion\ValueObjects\Specs;
use Illuminate\Contracts\Support\Arrayable;
class Operation implements Arrayable
{
/** @var string */
public $id;
/** @var string */
public $method;
/** @var array */
public $parameters;
/** @var string */
public $summary;
/** @var Request|null */
public $request;
/** @var Response[] */
public $responses;
/** @var string[] */
public $tags;
public function toArray(): array
{
$operation = [
'parameters' => $this->parameters,
'summary' => $this->summary,
'responses' => collect($this->responses)->mapWithKeys(
function (Response $response) {
return [(string)$response->statusCode => $response->toArray()];
}
)->toArray(),
'tags' => $this->tags
];
if ($this->request) {
$operation['requestBody'] = $this->request->toArray();
}
ksort($operation);
return $operation;
}
}
Function Calls
None |
Stats
MD5 | 297a644d9904459645bc0e35c2dd5d67 |
Eval Count | 0 |
Decode Time | 90 ms |