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 use OpenApi\Generator; use OpenApi\Pipeline; use OpenApi\Processors\BuildPaths; use..

Decoded Output download

<?php

use OpenApi\Generator;
use OpenApi\Pipeline;
use OpenApi\Processors\BuildPaths;
use SchemaQueryParameterProcessor\SchemaQueryParameter;

$classLoader = require __DIR__ . '/../../../vendor/autoload.php';

// register our app namespace...
$classLoader->addPsr4('App\', __DIR__ . '/app');
// and our custom processor
$classLoader->addPsr4('SchemaQueryParameterProcessor\', __DIR__);

$insertMatch = function (array $pipes) {
    foreach ($pipes as $ii => $pipe) {
        if ($pipe instanceof BuildPaths) {
            return $ii;
        }
    }

    return null;
};

$openapi = (new Generator())
    ->withProcessor(function (Pipeline $pipeline) use ($insertMatch) { $pipeline->insert(new SchemaQueryParameter(), $insertMatch); })
    ->generate([__DIR__ . '/app']);
// file_put_contents(__DIR__ . '/schema-query-parameter.yaml', $openapi->toYaml());
echo $openapi->toYaml();
 ?>

Did this file decode correctly?

Original Code

<?php

use OpenApi\Generator;
use OpenApi\Pipeline;
use OpenApi\Processors\BuildPaths;
use SchemaQueryParameterProcessor\SchemaQueryParameter;

$classLoader = require __DIR__ . '/../../../vendor/autoload.php';

// register our app namespace...
$classLoader->addPsr4('App\\', __DIR__ . '/app');
// and our custom processor
$classLoader->addPsr4('SchemaQueryParameterProcessor\\', __DIR__);

$insertMatch = function (array $pipes) {
    foreach ($pipes as $ii => $pipe) {
        if ($pipe instanceof BuildPaths) {
            return $ii;
        }
    }

    return null;
};

$openapi = (new Generator())
    ->withProcessor(function (Pipeline $pipeline) use ($insertMatch) { $pipeline->insert(new SchemaQueryParameter(), $insertMatch); })
    ->generate([__DIR__ . '/app']);
// file_put_contents(__DIR__ . '/schema-query-parameter.yaml', $openapi->toYaml());
echo $openapi->toYaml();

Function Calls

None

Variables

None

Stats

MD5 20688daa8a0926c06c8dc90940ac115e
Eval Count 0
Decode Time 85 ms