Showing 253 of 453 total issues
File InstallSchema.php
has 1314 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace MundiPagg\MundiPagg\Setup;
File Magento2PlatformOrderDecorator.php
has 945 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace MundiPagg\MundiPagg\Concrete;
use Magento\Customer\Model\ResourceModel\CustomerRepository;
File UpgradeData.php
has 708 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace MundiPagg\MundiPagg\Setup;
File PaymentMethodController.js
has 606 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var PaymentMethodController = function (methodCode, platformConfig) {
this.methodCode = methodCode;
this.platformConfig = platformConfig;
};
File Recurrence.php
has 561 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace MundiPagg\MundiPagg\Setup;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
Magento2PlatformOrderDecorator
has 62 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Magento2PlatformOrderDecorator extends AbstractPlatformOrderDecorator
{
/** @var Order */
protected $platformOrder;
File PlatformFormBiding.js
has 489 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var FormObject = {};
var PlatformConfig = {};
PlatformConfig.bind = function (platformConfig) {
grandTotal = parseFloat(platformConfig.grand_total);
File Plan.php
has 469 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Method installRecurrenceCharge
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function installRecurrenceCharge(SchemaSetupInterface $installer)
{
$tableName = $installer->getTable(
'mundipagg_module_core_recurrence_charge'
);
File Magento2CoreSetup.php
has 448 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace MundiPagg\MundiPagg\Concrete;
use Magento\Framework\App\Config as Magento2StoreConfig;
AbstractRequestDataProvider
has 45 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class AbstractRequestDataProvider
{
protected $orderAdapter;
protected $payment;
Method installProductsPlan
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function installProductsPlan(SchemaSetupInterface $installer)
{
$tableName = $installer->getTable('mundipagg_module_core_recurrence_products_plan');
if (!$installer->getConnection()->isTableExists($tableName)) {
$customer = $installer->getConnection()
Method installTransaction
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function installTransaction(
SchemaSetupInterface $installer
) {
$tableName = $installer->getTable('mundipagg_module_core_transaction');
if (!$installer->getConnection()->isTableExists($tableName)) {
Method installRecurrenceSubscription
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function installRecurrenceSubscription(SchemaSetupInterface $installer)
{
$tableName = $installer->getTable(
'mundipagg_module_core_recurrence_subscription'
);
Method getConfig
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConfig()
{
$config = [
'payment' => [
'ccform' => [
Function beforeInitializeLinks
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
Open
public function beforeInitializeLinks(
\Magento\Catalog\Model\Product\Initialization\Helper\ProductLinks $subject,
\Magento\Catalog\Model\Product $product,
array $links
) {
- 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
File UpgradeSchema.php
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace MundiPagg\MundiPagg\Setup;
use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
Method installCharge
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function installCharge(
SchemaSetupInterface $installer
) {
$tableName = $installer->getTable('mundipagg_module_core_charge');
if (!$installer->getConnection()->isTableExists($tableName)) {
Method updateVersionZeroOneTwo
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function updateVersionZeroOneTwo($setup)
{
$installer = $setup;
$installer->startSetup();
Magento2CoreSetup
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
Open
final class Magento2CoreSetup extends AbstractModuleCoreSetup
{
const MODULE_NAME = 'MundiPagg_MundiPagg';
protected function setModuleVersion()