vpietri/magento2-developer-quickdevbar

View on GitHub
Service/Request.php

Summary

Maintainability
A
1 hr
Test Coverage

Method pullData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function pullData()
    {
        $request = $this->requestHttp;
        $requestData = [];
        $requestData[] = ['name' => 'Date sys', 'value' => date("Y-m-d H:i:s")];
Severity: Minor
Found in Service/Request.php - About 1 hr to fix

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

        public function __construct(Http $requestHttp,
                                    State $appState,
                                    ProductMetadataInterface $productMetadata,
                                    FrontNameResolver $frontNameResolver,
                                    Session $session
    Severity: Minor
    Found in Service/Request.php - About 35 mins to fix

      The method pullData() has an NPath complexity of 256. The configured NPath complexity threshold is 200.
      Open

          public function pullData()
          {
              $request = $this->requestHttp;
              $requestData = [];
              $requestData[] = ['name' => 'Date sys', 'value' => date("Y-m-d H:i:s")];
      Severity: Minor
      Found in Service/Request.php by phpmd

      NPathComplexity

      Since: 0.1

      The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

      Example

      class Foo {
          function bar() {
              // lots of complicated code
          }
      }

      Source https://phpmd.org/rules/codesize.html#npathcomplexity

      There are no issues that match your filters.

      Category
      Status