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); /** * @license Apache 2.0 */ namespace OpenApi\Processo..
Decoded Output download
<?php declare(strict_types=1);
/**
* @license Apache 2.0
*/
namespace OpenApi\Processors;
use OpenApi\Analysis;
use OpenApi\Annotations as OA;
class CleanUnmerged implements ProcessorInterface
{
public function __invoke(Analysis $analysis)
{
$split = $analysis->split();
$merged = $split->merged->annotations;
$unmerged = $split->unmerged->annotations;
/** @var OA\AbstractAnnotation $annotation */
foreach ($analysis->annotations as $annotation) {
if (property_exists($annotation, '_unmerged')) {
foreach ($annotation->_unmerged as $i => $item) {
if ($merged->contains($item)) {
unset($annotation->_unmerged[$i]); // Property was merged
}
}
}
}
$analysis->openapi->_unmerged = [];
foreach ($unmerged as $annotation) {
$analysis->openapi->_unmerged[] = $annotation;
}
}
}
?>
Did this file decode correctly?
Original Code
<?php declare(strict_types=1);
/**
* @license Apache 2.0
*/
namespace OpenApi\Processors;
use OpenApi\Analysis;
use OpenApi\Annotations as OA;
class CleanUnmerged implements ProcessorInterface
{
public function __invoke(Analysis $analysis)
{
$split = $analysis->split();
$merged = $split->merged->annotations;
$unmerged = $split->unmerged->annotations;
/** @var OA\AbstractAnnotation $annotation */
foreach ($analysis->annotations as $annotation) {
if (property_exists($annotation, '_unmerged')) {
foreach ($annotation->_unmerged as $i => $item) {
if ($merged->contains($item)) {
unset($annotation->_unmerged[$i]); // Property was merged
}
}
}
}
$analysis->openapi->_unmerged = [];
foreach ($unmerged as $annotation) {
$analysis->openapi->_unmerged[] = $annotation;
}
}
}
Function Calls
None |
Stats
MD5 | 0471626fbbafeada3136014313ab56bd |
Eval Count | 0 |
Decode Time | 97 ms |