Showing 453 of 453 total issues
Method afterInit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Sales\Model\AdminOrder\Product\Quote\Initializer $subject,
$item,
\Magento\Quote\Model\Quote $quote,
\Magento\Catalog\Model\Product $product,
\Magento\Framework\DataObject $config
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
OrderAdapterInterface $orderAdapter,
InfoInterface $payment,
Session $session,
CustomerAddressInterface $customerAddressHelper,
ConfigInterface $config
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
OrderAdapterInterface $orderAdapter,
InfoInterface $payment,
Session $session,
CustomerAddressInterface $customerAddressHelper,
ConfigInterface $config
Function getBoletoLinkFromOrder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getBoletoLinkFromOrder($info)
{
$lastTransId = $info->getLastTransId();
$orderId = substr($lastTransId, 0, 19);
- 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 getAvailableRecurrenceMethods
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getAvailableRecurrenceMethods(
$recurrenceProducts,
$mundipaggPaymentsMethods
) {
if (empty($recurrenceProducts)) {
- 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 extractPaymentDataFromMundipaggBilletCreditcard
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function extractPaymentDataFromMundipaggBilletCreditcard(
$additionalInformation,
&$paymentData, $payment
)
{
- 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 placeOrder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
TwoCreditcardsModel.prototype.placeOrder = function (placeOrderObject) {
this.placeOrderObject = placeOrderObject;
var _self = this;
var errors = false;
- 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 placeOrder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
BoletoCreditcardModel.prototype.placeOrder = function (placeOrderObject) {
this.placeOrderObject = placeOrderObject;
var _self = this;
var errors = false;
- 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 getBoletoLinkFromOrder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getBoletoLinkFromOrder($info)
{
$lastTransId = $info->getLastTransId();
$orderId = substr($lastTransId, 0, 19);
- 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 sumInterests
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
PaymentMethodController.prototype.sumInterests = function(interest, selectName) {
var interest = interest;
var paymentMethodController = this;
var formObject = paymentMethodController.formObject;
- 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 validate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
TwoCreditcardsModel.prototype.validate = function () {
var formsInvalid = [];
for (id in this.formObject) {
- 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 getBoletoLinkFromOrder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getBoletoLinkFromOrder($info)
{
$lastTransId = $info->getLastTransId();
$orderId = substr($lastTransId, 0, 19);
- 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 getSavedCreditCards
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
PlatformConfig.getSavedCreditCards = function (platFormConfig) {
var creditCard = null;
var twoCreditCard = null;
var billetCreditCard = null;
var voucherCard = null;
- 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 getAvailableConfigMethods
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getAvailableConfigMethods()
{
$paymentMethods = [];
if ($this->mundipaggConfig->isBoletoEnabled()) {
- 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 getCartItems
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getCartItems()
{
$items = [];
/** @var \Magento\Sales\Model\Order\Item $item */
foreach ($this->getOrderAdapter()->getItems() as $item) {
- 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 modifyData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function modifyData(array $data)
{
/** @var \Magento\Catalog\Model\Product $product */
$product = $this->locator->getProduct();
$modelId = $product->getId();
- 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 getCreditCardsBrands
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getCreditCardsBrands()
{
$listCardConfig = MPSetup::getModuleConfiguration()->getCardConfigs();
$brands = [];
- 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 getCreditCardsBrands
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getCreditCardsBrands()
{
$listCardConfig = MPSetup::getModuleConfiguration()->getCardConfigs();
$brands = [];
- 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 prepareDataSource
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function prepareDataSource(array $dataSource)
{
if (!isset($dataSource['data']['items'])) {
return $dataSource;
}
- 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 buildProductListInCart
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function buildProductListInCart(Cart $cart)
{
$productList = new ProductListInCart();
$itemQuoteList = $cart->getQuote()->getAllVisibleItems();
- 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"