codeclimate/php-test-reporter

View on GitHub
src/TestReporter/ApiClient.php

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 6 of 6 total issues

Method sendWithCurl has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

private function sendWithCurl($url, $payload)
{
$response = new \stdClass;
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, true);
Severity: Minor
Found in src/TestReporter/ApiClient.php - About 1 hr to fix

    Method send has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    public function send(Entity\JsonFile $json)
    {
    $response = new \stdClass;
    $payload = (string)$json;
    $options = array(
    Severity: Minor
    Found in src/TestReporter/ApiClient.php - About 1 hr to fix

      Missing class import via use statement (line '32', column '25').
      Open

      $response = new \stdClass;
      Severity: Minor
      Found in src/TestReporter/ApiClient.php by phpmd

      Missing class import via use statement (line '76', column '25').
      Open

      $response = new \stdClass;
      Severity: Minor
      Found in src/TestReporter/ApiClient.php by phpmd

      Remove error control operator '@' on line 50.
      Open

      public function send(Entity\JsonFile $json)
      {
      $response = new \stdClass;
      $payload = (string)$json;
      $options = array(
      Severity: Minor
      Found in src/TestReporter/ApiClient.php by phpmd

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

      public function send(Entity\JsonFile $json)
      {
      $response = new \stdClass;
      $payload = (string)$json;
      $options = array(
      Severity: Minor
      Found in src/TestReporter/ApiClient.php by phpmd

      There are no issues that match your filters.

      Category
      Status