codeclimate/php-test-reporter

View on GitHub
src/TestReporter/Entity/CiInfo.php

Summary

Maintainability
B
5 hrs
Test Coverage

Showing 10 of 10 total issues

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

private function infoFrom(array $server)
{
if (isset($server["TRAVIS"])) {
return $this->travisProperties($server);
}
Severity: Minor
Found in src/TestReporter/Entity/CiInfo.php - About 1 hr to fix

    Function infoFrom has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    private function infoFrom(array $server)
    {
    if (isset($server["TRAVIS"])) {
    return $this->travisProperties($server);
    }
    Severity: Minor
    Found in src/TestReporter/Entity/CiInfo.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

    return $this->tddiumProperties($server);
    Severity: Major
    Found in src/TestReporter/Entity/CiInfo.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

      return $this->gitlabCiProperties($server);
      Severity: Major
      Found in src/TestReporter/Entity/CiInfo.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

        return $this->codeshipProperties($server);
        Severity: Major
        Found in src/TestReporter/Entity/CiInfo.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

          return $this->werckerProperties($server);
          Severity: Major
          Found in src/TestReporter/Entity/CiInfo.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

            return array();
            Severity: Major
            Found in src/TestReporter/Entity/CiInfo.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

              return $this->buildkiteProperties($server);
              Severity: Major
              Found in src/TestReporter/Entity/CiInfo.php - About 30 mins to fix

                The method infoFrom() has an NPath complexity of 768. The configured NPath complexity threshold is 200.
                Open

                private function infoFrom(array $server)
                {
                if (isset($server["TRAVIS"])) {
                return $this->travisProperties($server);
                }
                Severity: Minor
                Found in src/TestReporter/Entity/CiInfo.php by phpmd

                The method infoFrom() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
                Open

                private function infoFrom(array $server)
                {
                if (isset($server["TRAVIS"])) {
                return $this->travisProperties($server);
                }
                Severity: Minor
                Found in src/TestReporter/Entity/CiInfo.php by phpmd

                There are no issues that match your filters.

                Category
                Status