Showing 83 of 111 total issues
Method setFromArray
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setFromArray(array $data): void
{
foreach ($data as $key => $value) {
switch ($key) {
case 'entity_id':
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Helper $helper,
EavConfig $eavConfig,
DbContext $dbContext,
Manager $eventManager,
ExportEntityFactory $entityFactory,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Helper $helper,
EavConfig $eavConfig,
DbContext $dbContext,
Manager $eventManager,
ExportEntityFactory $entityFactory,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Helper $helper,
EavConfig $eavConfig,
DbContext $dbContext,
Manager $eventManager,
ExportEntityFactory $entityFactory,
Method getIterator
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getIterator(): \Traversable
{
while ($entityIds = $this->getEntityBatch()) {
try {
Profiler::start('eav-iterator::' . $this->entityCode);
Function scalarValue
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function scalarValue($value)
{
if (is_array($value)) {
$data = [];
foreach ($value as $key => $childValue) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function scalarValue
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function scalarValue($value)
{
if (is_array($value)) {
$data = [];
foreach ($value as $key => $childValue) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getIterator
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getIterator(): \Traversable
{
$batch = $this->collectionFactory->create(['store' => $this->store]);
foreach (parent::getIterator() as $entityData) {
$entity = $this->entityFactory->create(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function scalarValue
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function scalarValue($value)
{
if (is_array($value)) {
$data = [];
foreach ($value as $key => $childValue) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getIterator
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getIterator(): \Traversable
{
$batch = $this->collectionFactory->create(['store' => $this->store]);
foreach (parent::getIterator() as $entityData) {
$entity = $this->entityFactory->create(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getIterator
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getIterator(): \Traversable
{
$batch = $this->collectionFactory->create(['store' => $this->store]);
foreach (parent::getIterator() as $entityData) {
$entity = $this->entityFactory->create(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getStockItem
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getStockItem(): ?StockItem
{
if ($this->isStockCombined) {
return $this->stockItem;
}
Method getAttributeSelectEnterprise
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getAttributeSelectEnterprise(string $table, array $attributes): Select
{
$connection = $this->getConnection();
$select = $connection->select()
->from(['attribute_table' => $table], [])
Method setFromArray
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setFromArray(array $data): void
{
foreach ($data as $key => $value) {
switch ($key) {
case 'entity_id':
Method setFromArray
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setFromArray(array $data): void
{
foreach ($data as $key => $value) {
switch ($key) {
case 'entity_id':
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
ProductType $productType,
EavIteratorFactory $eavIteratorFactory,
IteratorInitializer $iteratorInitializer,
ExportEntityFactory $entityChildFactory,
CollectionFactory $collectionFactory,
Function setFromArray
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function setFromArray(array $data): void
{
foreach ($data as $key => $value) {
switch ($key) {
case 'entity_id':
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function generateFeed
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function generateFeed($type = null): void
{
if ($this->config->isRealTime()) {
$this->log->debug('Export set to real time, skipping cron export.');
return;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
EntityHydrator $hydrator,
WebsiteFactory $websiteFactory,
GroupFactory $groupFactory,
StoreFactory $storeFactory,
CategoryProvider $categoryProvider,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
DbResourceHelper $dbResource,
StockSourceProviderFactory $stockSourceProviderFactory,
TweakwiseStockItemFactory $tweakwiseStockItemFactory,
StoreManagerInterface $storeManager,
StockResolverFactory $stockResolverFactory,