dofinity/pelecard

View on GitHub
src/Pelecard/PelecardHttpRequest.php

Summary

Maintainability
A
0 mins
Test Coverage

Call to method post from undeclared class \GuzzleHttp\Client
Open

    $response = $client->post($uri, ['json' => $data]);
Severity: Critical
Found in src/Pelecard/PelecardHttpRequest.php by phan

Call to method __construct from undeclared class \GuzzleHttp\Client
Open

    $client = new Client(self::getConfig());
Severity: Critical
Found in src/Pelecard/PelecardHttpRequest.php by phan

Opening brace of a class must be on the line after the definition
Open

class PelecardHttpRequest {

The closing brace for the class must go on the next line after the body
Open

}

Line indented incorrectly; expected at least 8 spaces, found 6
Open

      ]

Line indented incorrectly; expected at least 4 spaces, found 2
Open

  const REQUEST_TIMEOUT = 10;

Line indented incorrectly; expected at least 4 spaces, found 2
Open

  const GATEWAY_BASE_URI = 'https://gateway20.pelecard.biz';

Line indented incorrectly; expected 4 spaces, found 2
Open

  public static function pelecardPostRequest($uri, $data) {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    $response = $client->post($uri, ['json' => $data]);

Multi-line function call not indented correctly; expected 8 spaces but found 6
Open

      (is_array(self::$clientConfig)) ? self::$clientConfig : [], // user config

Line indented incorrectly; expected at least 8 spaces, found 6
Open

      (is_array(self::$clientConfig)) ? self::$clientConfig : [], // user config

Line indented incorrectly; expected at least 4 spaces, found 2
Open

  const CONNECTION_TIMEOUT = 5;

Line indented incorrectly; expected at least 8 spaces, found 6
Open

      [

Multi-line function call not indented correctly; expected 8 spaces but found 6
Open

      ],

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    return array_merge(

Opening brace should be on a new line
Open

  public static function pelecardPostRequest($uri, $data) {

Line indented incorrectly; expected 4 spaces, found 2
Open

  public static $clientConfig;

Line indented incorrectly; expected at least 8 spaces, found 6
Open

      ],

Multi-line function call not indented correctly; expected 8 spaces but found 6
Open

      [

Expected 1 newline at end of file; 0 found
Open

}

Multi-line function call not indented correctly; expected 8 spaces but found 6
Open

      [

Line indented incorrectly; expected 4 spaces, found 2
Open

  }

Multi-line function call not indented correctly; expected 8 spaces but found 6
Open

      ]

Line indented incorrectly; expected 4 spaces, found 2
Open

  }

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    $client = new Client(self::getConfig());

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    return $response->getBody()->getContents();

Line indented incorrectly; expected 4 spaces, found 2
Open

  public static function getConfig() {

Line indented incorrectly; expected at least 8 spaces, found 6
Open

      [

Opening brace should be on a new line
Open

  public static function getConfig() {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    );

There are no issues that match your filters.

Category
Status