original_string: protected function writeScanFailStatistic(CoverFishResult $coverFishResult)
      {
          $errorStatistic = '%s file(s) and %s method(s) scanned, coverage failed: %s cover annotation problem(s) found!%s';
          $errorStatistic = sprintf($errorStatistic,
              $coverFishResult->getFileCount(),
              $coverFishResult->getTestCount(),
              $coverFishResult->getFailureCount(),
              PHP_EOL
          );
  
          $scanResultMacro = '%s%s%s%s';
          $scanResult = sprintf($scanResultMacro,
              ($this->outputLevel === 0)
                  ? PHP_EOL
                  : null,
              PHP_EOL,
              (false === $this->preventAnsiColors)
                  ? Color::tplRedColor($errorStatistic)
                  : $errorStatistic,
              $this->getScanFailPassStatistic($coverFishResult)
          );
  
          $this->write($scanResult);
  
          throw new CoverFishFailExit();
      }
code: protected function writeScanFailStatistic(CoverFishResult $coverFishResult)
      {
          $errorStatistic = '%s file(s) and %s method(s) scanned, coverage failed: %s cover annotation problem(s) found!%s';
          $errorStatistic = sprintf($errorStatistic,
              $coverFishResult->getFileCount(),
              $coverFishResult->getTestCount(),
              $coverFishResult->getFailureCount(),
              PHP_EOL
          );
  
          $scanResultMacro = '%s%s%s%s';
          $scanResult = sprintf($scanResultMacro,
              ($this->outputLevel === 0)
                  ? PHP_EOL
                  : null,
              PHP_EOL,
              (false === $this->preventAnsiColors)
                  ? Color::tplRedColor($errorStatistic)
                  : $errorStatistic,
              $this->getScanFailPassStatistic($coverFishResult)
          );
  
          $this->write($scanResult);
  
          throw new CoverFishFailExit();
      }
code_tokens: protected function writeScanFailStatistic ( CoverFishResult $ coverFishResult ) { $ errorStatistic = '%s file(s) and %s method(s) scanned, coverage failed: %s cover annotation problem(s) found!%s' ; $ errorStatistic = sprintf ( $ errorStatistic , $ coverFishResult -> getFileCount ( ) , $ coverFishResult -> getTestCount ( ) , $ coverFishResult -> getFailureCount ( ) , PHP_EOL ) ; $ scanResultMacro = '%s%s%s%s' ; $ scanResult = sprintf ( $ scanResultMacro , ( $ this -> outputLevel === 0 ) ? PHP_EOL : null , PHP_EOL , ( false === $ this -> preventAnsiColors ) ? Color :: tplRedColor ( $ errorStatistic ) : $ errorStatistic , $ this -> getScanFailPassStatistic ( $ coverFishResult ) ) ; $ this -> write ( $ scanResult ) ; throw new CoverFishFailExit ( ) ; }
docstring: write scan fail result
  
  @param CoverFishResult $coverFishResult
  
  @throws CoverFishFailExit
docstring_tokens: write scan fail result