Showing 83 of 101 total issues
Method createOperationsFromInvoice
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function createOperationsFromInvoice(array $invoice, VendorInterface $vendor, DateTime $cycleDate)
{
$operations = array();
Method process
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process($tmpFilesPath, DateTime $lastUpdate = null)
{
try {
$this->logger->info('Control Mirakl Settings', array('miraklId' => null, "action" => "Wallet creation"));
Function handleBankInfo
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function handleBankInfo($vendorCollection, $miraklDataCollection, $tmpFilePath)
{
//Index mirakl Data
$miraklDataCollection = $this->indexMiraklData($miraklDataCollection);
- 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 withdraw
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function withdraw(OperationInterface $operation)
{
try {
$vendor = $this->getVendor($operation);
- 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 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(
array $miraklData
) {
$this->email = $miraklData['contact_informations']['email'];
$this->controleType = 'CREDENTIALS';
Method setNewStatus
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function setNewStatus(
$operationId,
$operation,
$successStatus,
$failStatus,
Method getBalance
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getBalance(VendorInterface $vendor)
{
$this->resetRestClient();
$this->restClient->getConfig()->setPath(
Method getAccountInfos
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAccountInfos(UserAccount $userAccount, $vendor = null)
{
$this->resetRestClient();
$this->restClient->getConfig()->setPath(
Method identification
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function identification($hipayId, $date, $status)
{
if ($status) {
$eventName = 'identification.notification.success';
$statusRequest = LogVendorsInterface::SUCCESS;
Function handleHiPayNotification
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function handleHiPayNotification($xml)
{
if (!$xml) {
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 logOperation
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function logOperation($miraklId, $paymentVoucherNumber, $status, $message)
{
$logOperation = $this->logOperationsManager->findByMiraklIdAndPaymentVoucherNumber(
$miraklId,
$paymentVoucherNumber
Method bankInfoValidation
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function bankInfoValidation($vendor, $date, $status)
{
// if status is OK
if ($status) {
$this->mirakl->updateOneVendor(
Method getFileBack
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getFileBack($fileType, $allMiraklFiles, $frontFile, $shopId, $tmpFilePath)
{
try {
$backType = $this->getFileBackType($fileType);
Method controlMiraklSettings
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function controlMiraklSettings($docTypes)
{
// init mirakl settings by API Mirakl
$documentDto = $this->getDocumentTypesDto();
$countDocHiPay = count($docTypes);
Function controlMiraklSettings
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function controlMiraklSettings($docTypes)
{
// init mirakl settings by API Mirakl
$documentDto = $this->getDocumentTypesDto();
$countDocHiPay = count($docTypes);
- 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 10 arguments (exceeds 4 allowed). Consider refactoring. Open
EventDispatcherInterface $dispatcher,
LoggerInterface $logger,
Factory $factory,
VendorInterface $operatorAccount,
VendorInterface $technicalAccount,
Method logVendor
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
$miraklId,
$hipayId,
$login,
$statusWalletAccount,
$status,
Method withdrawalValidation
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function withdrawalValidation($hipayId, DateTime $date, $withdrawalId, $status)
{
$operation = $this->operationManager
->findByWithdrawalId($withdrawalId);
Method createFullUseraccountV2
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createFullUseraccountV2(UserAccount $userAccount)
{
$this->resetRestClient();
if (!$userAccount->getLocale()) {
Method processInvoices
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function processInvoices(array $invoices, DateTime $cycleDate)
{
$operations = array();