Showing 83 of 101 total issues
File Processor.php
has 815 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace HiPay\Wallet\Mirakl\Vendor;
use DateTime;
File HiPay.php
has 679 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace HiPay\Wallet\Mirakl\Api;
use DateTime;
UserAccount
has 58 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class UserAccount extends ModelAbstract
{
//Non mandatory properties
/**
* @var string
UserAccountDetails
has 55 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class UserAccountDetails extends ModelAbstract
{
//Non mandatory properties
/** @var int
Method transferFiles
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function transferFiles(array $shopIds, $tmpFilePath)
{
if (count($shopIds) > 0) {
// Fetches all Mirakl file names
$allMiraklFiles = array();
Function transferFiles
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
Open
public function transferFiles(array $shopIds, $tmpFilePath)
{
if (count($shopIds) > 0) {
// Fetches all Mirakl file names
$allMiraklFiles = array();
- 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
HiPay
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class HiPay implements ApiInterface
{
/** @var string the hipay webservice login */
protected $login;
Processor
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Processor extends AbstractApiProcessor
{
/** @var VendorManagerInterface */
protected $vendorManager;
Method registerWallets
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function registerWallets($miraklData)
{
$vendorCollection = array();
foreach ($miraklData as $vendorData) {
Method withdraw
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function withdraw(OperationInterface $operation)
{
try {
$vendor = $this->getVendor($operation);
File Handler.php
has 321 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace HiPay\Wallet\Mirakl\Notification;
use DateTime;
File UserAccount.php
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace HiPay\Wallet\Mirakl\Api\HiPay\Model\Rest;
use HiPay\Wallet\Mirakl\Service\Country;
Method transfer
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function transfer(OperationInterface $operation)
{
try {
$vendor = $this->getVendor($operation);
File Initializer.php
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace HiPay\Wallet\Mirakl\Cashout;
use DateTime;
Method handleHiPayNotification
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handleHiPayNotification($xml)
{
if (!$xml) {
return;
}
File UserAccountDetails.php
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace HiPay\Wallet\Mirakl\Api\HiPay\Model\Soap;
use HiPay\Wallet\Mirakl\Service\Country;
Method handleBankInfo
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handleBankInfo($vendorCollection, $miraklDataCollection, $tmpFilePath)
{
//Index mirakl Data
$miraklDataCollection = $this->indexMiraklData($miraklDataCollection);
BankInfo
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class BankInfo extends ModelAbstract
{
/**
* @var string
*
BankInfo
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class BankInfo extends ModelAbstract
{
/**
* @var string
*
Function registerWallets
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Open
public function registerWallets($miraklData)
{
$vendorCollection = array();
foreach ($miraklData as $vendorData) {
- 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"