<commit_before><?php
namespace CtiDigital\Configurator\Component;

use Magento\Catalog\Model\ProductFactory;
use Magento\Framework\ObjectManagerInterface;
use CtiDigital\Configurator\Api\LoggerInterface;
use CtiDigital\Configurator\Component\Product\Image;
use CtiDigital\Configurator\Component\Product\AttributeOption;
use FireGento\FastSimpleImport\Model\ImporterFactory;
use CtiDigital\Configurator\Exception\ComponentException;

/**
 * Class Products
 * @package CtiDigital\Configurator\Model\Component
 *
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class Products extends CsvComponentAbstract
{
    const SKU_COLUMN_HEADING = 'sku';
    const QTY_COLUMN_HEADING = 'qty';
    const IS_IN_STOCK_COLUMN_HEADING = 'is_in_stock';
    const SEPARATOR = ';';

    protected $alias = 'products';
    protected $name = 'Products';
    protected $description = 'Component to import products using a CSV file.';

    protected $imageAttributes = [
        'image',
        'small_image',
        'thumbnail',
        'media_image'
    ];

    /**
     * The attributes that may use ',' as the separator and need replacing
     *
     * @var array
     */
    protected $attrSeparator = [
        'product_websites',
        'store_view_code'
    ];

    /**
     * Attributes that may have newlines defined. These will be split into
     * paragraphs so text looks the same on frontend.
     *
     * @var array
     */
    protected $attrDescription = [
        'description',
        'short_description'
    ];

    /**
     * @var ImporterFactory
     */
    protected $importerFactory;

    /**
     * @var ProductFactory
     */
    protected $productFactory;

    /**
     * @var Image
     */
    protected $image;

    /**
     * @var AttributeOption
     */
    protected $attributeOption;

    /**
     * @var []
     */
    private $successProducts;

    /**
     * @var []
     */
    private $skippedProducts;<commit_msg>Set a default empty array value for class members to prevent warnings in PHP 7.2<commit_after><?php
namespace CtiDigital\Configurator\Component;

use Magento\Catalog\Model\ProductFactory;
use Magento\Framework\ObjectManagerInterface;
use CtiDigital\Configurator\Api\LoggerInterface;
use CtiDigital\Configurator\Component\Product\Image;
use CtiDigital\Configurator\Component\Product\AttributeOption;
use FireGento\FastSimpleImport\Model\ImporterFactory;
use CtiDigital\Configurator\Exception\ComponentException;

/**
 * Class Products
 * @package CtiDigital\Configurator\Model\Component
 *
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class Products extends CsvComponentAbstract
{
    const SKU_COLUMN_HEADING = 'sku';
    const QTY_COLUMN_HEADING = 'qty';
    const IS_IN_STOCK_COLUMN_HEADING = 'is_in_stock';
    const SEPARATOR = ';';

    protected $alias = 'products';
    protected $name = 'Products';
    protected $description = 'Component to import products using a CSV file.';

    protected $imageAttributes = [
        'image',
        'small_image',
        'thumbnail',
        'media_image'
    ];

    /**
     * The attributes that may use ',' as the separator and need replacing
     *
     * @var array
     */
    protected $attrSeparator = [
        'product_websites',
        'store_view_code'
    ];

    /**
     * Attributes that may have newlines defined. These will be split into
     * paragraphs so text looks the same on frontend.
     *
     * @var array
     */
    protected $attrDescription = [
        'description',
        'short_description'
    ];

    /**
     * @var ImporterFactory
     */
    protected $importerFactory;

    /**
     * @var ProductFactory
     */
    protected $productFactory;

    /**
     * @var Image
     */
    protected $image;

    /**
     * @var AttributeOption
     */
    protected $attributeOption;

    /**
     * @var []
     */
    private $successProducts = [];

    /**
     * @var []
     */
    private $skippedProducts = [];
{'fraction_non_alphanumeric': 0.10594184576485462, 'fraction_numerical': 0.0005056890012642225, 'mean_word_length': 2.725047080979284, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6680562', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1157, 'n_words': 259}