hipay/hipay-wallet-cashout-mirakl-library

View on GitHub

Showing 83 of 101 total issues

Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $md5string,
        $callback_salt,
        $hipayId,
        $message = '',
        $code = 0,
Severity: Minor
Found in src/Exception/ChecksumFailedException.php - About 45 mins to fix

    Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            $miraklId,
            $operation,
            $amount,
            $balance,
            $code = 0,
    Severity: Minor
    Found in src/Exception/WrongWalletBalance.php - About 45 mins to fix

      Method create has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function create($miraklId, $hipayId, $paymentVoucher, $amount, $originAmount, $balance);
      Severity: Minor
      Found in src/Notification/Model/LogOperationsManagerInterface.php - About 45 mins to fix

        Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                EventDispatcherInterface $dispatcherInterface,
                LoggerInterface $logger,
                ApiFactory $factory,
                VendorManagerInterface $vendorManager,
                DocumentManagerInterface $documentManager,
        Severity: Minor
        Found in src/Vendor/Processor.php - About 45 mins to fix

          Function transfer has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public function transfer(OperationInterface $operation)
              {
                  try {
                      $vendor = $this->getVendor($operation);
          
          
          Severity: Minor
          Found in src/Cashout/Transfer.php - About 45 mins to fix

          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 processInvoices has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              private function processInvoices(array $invoices, DateTime $cycleDate)
              {
          
                  $operations = array();
          
          
          Severity: Minor
          Found in src/Cashout/Initializer.php - About 45 mins to fix

          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 disableVendor has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              private function disableVendor($vendorData)
              {
          
                  $vendor = $this->vendorManager->findByMiraklId($vendorData['shop_id']);
                  $logVendor = $this->logVendorManager->findByMiraklId($vendorData['shop_id']);
          Severity: Minor
          Found in src/Vendor/Processor.php - About 45 mins to fix

          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 create has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  $miraklId,
                  $type,
                  $action,
                  $message,
                  $date
          Severity: Minor
          Found in src/Notification/Model/LogGeneralManagerInterface.php - About 35 mins to fix

            Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    VendorInterface $vendor,
                    BankInfo $bankInfo,
                    $message = '',
                    $code = 0,
                    Exception $previous = null
            Severity: Minor
            Found in src/Exception/InvalidBankInfoException.php - About 35 mins to fix

              Method uploadDocument has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function uploadDocument($userSpaceId, $accountId, $documentType, $fileName, \DateTime $validityDate = null);
              Severity: Minor
              Found in src/Api/HiPay/ApiInterface.php - About 35 mins to fix

                Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        ClientErrorResponseException $guzzleException,
                        $command,
                        $parameters,
                        $code = 0,
                        Exception $previous = null
                Severity: Minor
                Found in src/Exception/HipayRestResponseException.php - About 35 mins to fix

                  Method getFileBack has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      private function getFileBack($fileType, $allMiraklFiles, $frontFile, $shopId, $tmpFilePath)
                  Severity: Minor
                  Found in src/Vendor/Processor.php - About 35 mins to fix

                    Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            VendorInterface $vendor,
                            BankInfo $bankInfo,
                            $message = '',
                            $code = 0,
                            Exception $previous = null
                    Severity: Minor
                    Found in src/Exception/BankAccountCreationFailedException.php - About 35 mins to fix

                      Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              BankInfoStatus $status,
                              $miraklId = null,
                              $message = '',
                              $code = 0,
                              Exception $previous = null
                      Severity: Minor
                      Found in src/Exception/UnconfirmedBankAccountException.php - About 35 mins to fix

                        Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public function __construct($userAccountld, $userSpaceld, $identified, $callbackSalt, $requestMessage = "")
                        Severity: Minor
                        Found in src/Api/HiPay/Wallet/AccountInfo.php - About 35 mins to fix

                          Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  $hipayId,
                                  DateTime $date,
                                  $amount,
                                  $currency,
                                  $label
                          Severity: Minor
                          Found in src/Notification/Event/Other.php - About 35 mins to fix

                            Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    $amount,
                                    VendorInterface $vendorInterface,
                                    $privateLabel,
                                    $publicLabel,
                                    $merchantUniqueId
                            Severity: Minor
                            Found in src/Api/HiPay/Model/Soap/Transfer.php - About 35 mins to fix

                              Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      $constraintViolationList,
                                      $object,
                                      $message = '',
                                      $code = 0,
                                      Exception $previous = null
                              Severity: Minor
                              Found in src/Exception/ValidationFailedException.php - About 35 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                                return $document->getDocumentType() == $theFile['type'] &&
                                                                    $document->getMiraklDocumentId() == $theFile['id'];
                                Severity: Major
                                Found in src/Vendor/Processor.php - About 30 mins to fix

                                  Function logOperation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      protected function logOperation($miraklId, $paymentVoucherNumber, $status, $message)
                                      {
                                          $logOperation = $this->logOperationsManager->findByMiraklIdAndPaymentVoucherNumber(
                                              $miraklId,
                                              $paymentVoucherNumber
                                  Severity: Minor
                                  Found in src/Cashout/AbstractOperationProcessor.php - About 25 mins to fix

                                  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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language