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 /** * Copyright Magento, Inc. All rights reserved. * See COPYING.txt for license ..

Decoded Output download

<?php
/**
 * Copyright  Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
declare(strict_types=1);

namespace Magento\CatalogGraphQl\Plugin\Search;

use Magento\CatalogGraphQl\DataProvider\Product\RequestDataBuilder;
use Magento\Framework\Search\Request\Config;

class RequestBuilderPlugin
{
    /**
     * Constructor
     *
     * @param RequestDataBuilder $localData
     * @phpcs:disable Magento2.CodeAnalysis.EmptyBlock
     */
    public function __construct(private RequestDataBuilder $localData)
    {
    }

    /**
     * Get around
     *
     * @param Config $subject
     * @param callable $proceed
     * @param string $requestName
     * @return array
     */
    public function aroundGet(Config $subject, callable $proceed, string $requestName)
    {
        if ($this->localData->getData($requestName)) {
            return $this->localData->getData($requestName);
        } else {
            return $proceed($requestName);
        }
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * Copyright  Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
declare(strict_types=1);

namespace Magento\CatalogGraphQl\Plugin\Search;

use Magento\CatalogGraphQl\DataProvider\Product\RequestDataBuilder;
use Magento\Framework\Search\Request\Config;

class RequestBuilderPlugin
{
    /**
     * Constructor
     *
     * @param RequestDataBuilder $localData
     * @phpcs:disable Magento2.CodeAnalysis.EmptyBlock
     */
    public function __construct(private RequestDataBuilder $localData)
    {
    }

    /**
     * Get around
     *
     * @param Config $subject
     * @param callable $proceed
     * @param string $requestName
     * @return array
     */
    public function aroundGet(Config $subject, callable $proceed, string $requestName)
    {
        if ($this->localData->getData($requestName)) {
            return $this->localData->getData($requestName);
        } else {
            return $proceed($requestName);
        }
    }
}

Function Calls

None

Variables

None

Stats

MD5 c9b00b4eea6b1d817fa107b94c41022e
Eval Count 0
Decode Time 110 ms