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.
*/
/**
* Cart product configuration model
*/
namespace Magento\Catalog\Model\Product;
class CartConfiguration
{
/**
* Decide whether product has been configured for cart or not
*
* @param \Magento\Catalog\Model\Product $product
* @param array $config
* @return bool
*/
public function isProductConfigured(\Magento\Catalog\Model\Product $product, $config)
{
// If below POST fields were submitted - this is product's options, it has been already configured
switch ($product->getTypeId()) {
case \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE:
case \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL:
return isset($config['options']);
case \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE:
return isset($config['bundle_option']);
}
return false;
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* Cart product configuration model
*/
namespace Magento\Catalog\Model\Product;
class CartConfiguration
{
/**
* Decide whether product has been configured for cart or not
*
* @param \Magento\Catalog\Model\Product $product
* @param array $config
* @return bool
*/
public function isProductConfigured(\Magento\Catalog\Model\Product $product, $config)
{
// If below POST fields were submitted - this is product's options, it has been already configured
switch ($product->getTypeId()) {
case \Magento\Catalog\Model\Product\Type::TYPE_SIMPLE:
case \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL:
return isset($config['options']);
case \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE:
return isset($config['bundle_option']);
}
return false;
}
}
Function Calls
None |
Stats
MD5 | 0c1cb437964f31b3b2169a7a425991f8 |
Eval Count | 0 |
Decode Time | 87 ms |