YetiForceCompany/YetiForceCRM

View on GitHub
api/webservice/Core/Exception.php

Summary

Maintainability
B
4 hrs
Test Coverage
F
41%

handleError accesses the super-global variable $_POST.
Open

    public function handleError(): void
    {
        if (\App\Config::debug('apiLogException')) {
            $request = Request::init();
            $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
Severity: Minor
Found in api/webservice/Core/Exception.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleError accesses the super-global variable $_SERVER.
Open

    public function handleError(): void
    {
        if (\App\Config::debug('apiLogException')) {
            $request = Request::init();
            $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
Severity: Minor
Found in api/webservice/Core/Exception.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleError accesses the super-global variable $_SERVER.
Open

    public function handleError(): void
    {
        if (\App\Config::debug('apiLogException')) {
            $request = Request::init();
            $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
Severity: Minor
Found in api/webservice/Core/Exception.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleError accesses the super-global variable $_GET.
Open

    public function handleError(): void
    {
        if (\App\Config::debug('apiLogException')) {
            $request = Request::init();
            $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
Severity: Minor
Found in api/webservice/Core/Exception.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleError accesses the super-global variable $_SERVER.
Open

    public function handleError(): void
    {
        if (\App\Config::debug('apiLogException')) {
            $request = Request::init();
            $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
Severity: Minor
Found in api/webservice/Core/Exception.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleError accesses the super-global variable $_SERVER.
Open

    public function handleError(): void
    {
        if (\App\Config::debug('apiLogException')) {
            $request = Request::init();
            $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
Severity: Minor
Found in api/webservice/Core/Exception.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleError accesses the super-global variable $_GET.
Open

    public function handleError(): void
    {
        if (\App\Config::debug('apiLogException')) {
            $request = Request::init();
            $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
Severity: Minor
Found in api/webservice/Core/Exception.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

handleError accesses the super-global variable $_POST.
Open

    public function handleError(): void
    {
        if (\App\Config::debug('apiLogException')) {
            $request = Request::init();
            $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
Severity: Minor
Found in api/webservice/Core/Exception.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Method __construct has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct($message, $code = 500, \Throwable $previous = null)
    {
        $message = rtrim(str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', $message), PHP_EOL);
        if (!empty($previous)) {
            parent::__construct($message, $code, $previous);
Severity: Minor
Found in api/webservice/Core/Exception.php - About 1 hr to fix

    Method handleError has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function handleError(): void
        {
            if (\App\Config::debug('apiLogException')) {
                $request = Request::init();
                $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
    Severity: Minor
    Found in api/webservice/Core/Exception.php - About 1 hr to fix

      Function handleError has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

          public function handleError(): void
          {
              if (\App\Config::debug('apiLogException')) {
                  $request = Request::init();
                  $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
      Severity: Minor
      Found in api/webservice/Core/Exception.php - About 55 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 __construct has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          public function __construct($message, $code = 500, \Throwable $previous = null)
          {
              $message = rtrim(str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', $message), PHP_EOL);
              if (!empty($previous)) {
                  parent::__construct($message, $code, $previous);
      Severity: Minor
      Found in api/webservice/Core/Exception.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

      Avoid using static access to class '\App\Config' in method '__construct'.
      Open

              if (!\App\Config::debug('apiShowExceptionMessages')) {
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'Api\Core\Request' in method '__construct'.
      Open

              $response->setRequest(Request::init());
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method '__construct'.
      Open

              if (\App\Config::debug('apiShowExceptionBacktrace')) {
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method '__construct'.
      Open

              if (\App\Config::debug('apiShowExceptionReasonPhrase')) {
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid assigning values to variables in if clauses and the like (line '95', column '8').
      Open

          public function handleError(): void
          {
              if (\App\Config::debug('apiLogException')) {
                  $request = Request::init();
                  $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      IfStatementAssignment

      Since: 2.7.0

      Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($foo = 'bar') { // possible typo
                  // ...
              }
              if ($baz = 0) { // always false
                  // ...
              }
          }
      }

      Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

      Avoid using static access to class '\App\Debuger' in method '__construct'.
      Open

                  $body['error']['backtrace'] = \App\Debuger::getBacktrace();
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'Api\Core\Response' in method '__construct'.
      Open

              $response = Response::getInstance();
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Config' in method 'handleError'.
      Open

              if (\App\Config::debug('apiLogException')) {
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\RequestUtil' in method 'handleError'.
      Open

                  $error .= '============ Request ' . \App\RequestUtil::requestId() . ' ======  ' . date('Y-m-d H:i:s') . "  ======\n";
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class '\App\Request' in method 'handleError'.
      Open

                  $error .= 'REQUEST_METHOD: ' . \App\Request::getRequestMethod() . PHP_EOL;
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Avoid using static access to class 'Api\Core\Request' in method 'handleError'.
      Open

                  $request = Request::init();
      Severity: Minor
      Found in api/webservice/Core/Exception.php by phpmd

      StaticAccess

      Since: 1.4.0

      Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

      Example

      class Foo
      {
          public function bar()
          {
              Bar::baz();
          }
      }

      Source https://phpmd.org/rules/cleancode.html#staticaccess

      Define a constant instead of duplicating this literal "error" 5 times.
      Open

                  'error' => [
      Severity: Critical
      Found in api/webservice/Core/Exception.php by sonar-php

      Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

      On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

      Noncompliant Code Example

      With the default threshold of 3:

      function run() {
        prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
        execute('action1');
        release('action1');
      }
      

      Compliant Solution

      ACTION_1 = 'action1';
      
      function run() {
        prepare(ACTION_1);
        execute(ACTION_1);
        release(ACTION_1);
      }
      

      Exceptions

      To prevent generating some false-positives, literals having less than 5 characters are excluded.

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (empty($this->code)) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  ],

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $response->setRequest(Request::init());

      Spaces must be used to indent lines; tabs are not allowed
      Open

          public function handleError(): void

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= '============ stacktrace: ' . PHP_EOL . $this->getTraceAsString() . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= '----------- Request data -----------' . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $error .= "----------- _POST -----------\n";

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $body['error']['line'] = $this->getLine();

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * Handle error function.

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= "file: {$this->getFile()} ({$this->getLine()})\n";

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  foreach ($request->getHeaders() as $key => $header) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if ($_POST) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  file_put_contents(ROOT_DIRECTORY . '/cache/logs/webserviceErrors.log', '============ Error exception ====== ' . date('Y-m-d H:i:s') . ' ======'

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $response->setBody($body);

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= '============ Request ' . \App\RequestUtil::requestId() . ' ======  ' . date('Y-m-d H:i:s') . "  ======\n";

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (\App\Config::debug('apiShowExceptionBacktrace')) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

           *

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= 'PATH_INFO: ' . ($_SERVER['PATH_INFO'] ?? '') . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= 'IP: ' . $_SERVER['REMOTE_ADDR'] . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

          public function __construct($message, $code = 500, \Throwable $previous = null)

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  'status' => 0,

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      'message' => $message,

      Spaces must be used to indent lines; tabs are not allowed
      Open

              ];

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if (!empty($previous)) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $request = Request::init();

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $this->file = $previous->getFile();

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (!\App\Config::debug('apiShowExceptionMessages')) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $body = [

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $response = Response::getInstance();

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (\App\Config::debug('apiLogException')) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if ($_GET) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $this->line = $previous->getLine();

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $message = 'Internal Server Error';

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $body['error']['previous'] = rtrim(str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', $previous->__toString()), PHP_EOL);

      Line exceeds 120 characters; contains 141 characters
      Open

                      $body['error']['previous'] = rtrim(str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', $previous->__toString()), PHP_EOL);

      Spaces must be used to indent lines; tabs are not allowed
      Open

           * @return void

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error = "code: {$this->getCode()} | message: {$this->getMessage()}\n";

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }

      Spaces must be used to indent lines; tabs are not allowed
      Open

          /** {@inheritdoc}  */

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  'error' => [

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $body['error']['file'] = rtrim(str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', $this->getFile()), PHP_EOL);

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $body['error']['backtrace'] = \App\Debuger::getBacktrace();

      Line exceeds 120 characters; contains 129 characters
      Open

                  $error .= '============ Request ' . \App\RequestUtil::requestId() . ' ======  ' . date('Y-m-d H:i:s') . "  ======\n";

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (\App\Config::debug('apiShowExceptionReasonPhrase')) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $response->send();

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= 'REQUEST_URI: ' . $_SERVER['REQUEST_URI'] . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $error .= "----------- _GET -----------\n";

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $error .= print_r($_POST, true) . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $error .= "----------- Request payload -----------\n";

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $error .= print_r($payload, true) . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $this->message = $message;

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $this->code = $code;

      Line exceeds 120 characters; contains 126 characters
      Open

                  $body['error']['file'] = rtrim(str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', $this->getFile()), PHP_EOL);

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  if ($payload = file_get_contents('php://input')) {

      Line exceeds 120 characters; contains 155 characters
      Open

                  file_put_contents(ROOT_DIRECTORY . '/cache/logs/webserviceErrors.log', '============ Error exception ====== ' . date('Y-m-d H:i:s') . ' ======'

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $message = rtrim(str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', $message), PHP_EOL);

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (!empty($previous)) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

          /**

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $error .= $key . ': ' . $header . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      $error .= print_r($_GET, true) . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

              if (empty($this->message)) {

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $response->setReasonPhrase($this->message);

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= 'REQUEST_METHOD: ' . \App\Request::getRequestMethod() . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= print_r($request->getAllRaw(), true) . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      'code' => $code,

      Spaces must be used to indent lines; tabs are not allowed
      Open

          }

      Spaces must be used to indent lines; tabs are not allowed
      Open

           */

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= 'QUERY_STRING: ' . $_SERVER['QUERY_STRING'] . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

              }

      Spaces must be used to indent lines; tabs are not allowed
      Open

              $response->setStatus($code);

      Spaces must be used to indent lines; tabs are not allowed
      Open

          {

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  parent::__construct($message, $code, $previous);

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  $error .= '----------- Headers -----------' . PHP_EOL;

      Spaces must be used to indent lines; tabs are not allowed
      Open

                  }

      Spaces must be used to indent lines; tabs are not allowed
      Open

                      . PHP_EOL . $error . PHP_EOL, FILE_APPEND);

      There are no issues that match your filters.

      Category
      Status