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\CatalogImportExport\Model\Export\Product;

use Magento\Catalog\Model\ResourceModel\Product\Collection;
use Magento\CatalogImportExport\Model\Export\ProductFilterInterface;

/**
 * Category filter for products export
 */
class CategoryFilter implements ProductFilterInterface
{
    private const NAME = 'category_ids';

    /**
     * @inheritDoc
     */
    public function filter(Collection $collection, array $filters): Collection
    {
        $value = trim($filters[self::NAME] ?? '');
        if ($value) {
            $collection->addCategoriesFilter(['in' => explode(',', $value)]);
            $collection->setFlag(self::NAME . '_filter_applied');
        }
        return $collection;
    }
}
 ?>

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\CatalogImportExport\Model\Export\Product;

use Magento\Catalog\Model\ResourceModel\Product\Collection;
use Magento\CatalogImportExport\Model\Export\ProductFilterInterface;

/**
 * Category filter for products export
 */
class CategoryFilter implements ProductFilterInterface
{
    private const NAME = 'category_ids';

    /**
     * @inheritDoc
     */
    public function filter(Collection $collection, array $filters): Collection
    {
        $value = trim($filters[self::NAME] ?? '');
        if ($value) {
            $collection->addCategoriesFilter(['in' => explode(',', $value)]);
            $collection->setFlag(self::NAME . '_filter_applied');
        }
        return $collection;
    }
}

Function Calls

None

Variables

None

Stats

MD5 d48466f19f2d716412b51fccab71f7f9
Eval Count 0
Decode Time 98 ms