Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/Reports/Cbf.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

use PHP_CodeSniffer\Exceptions\DeepExitException;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Util\Timing;
use PHP_CodeSniffer\Util\Writers\StatusWriter;

class Cbf implements Report
Expand Down Expand Up @@ -254,10 +253,6 @@ public function generate(

echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL;

if ($toScreen === true && $interactive === false) {
Timing::printRunTime();
}

}//end generate()


Expand Down
5 changes: 0 additions & 5 deletions src/Reports/Code.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Exception;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Util\Common;
use PHP_CodeSniffer\Util\Timing;
use PHP_CodeSniffer\Util\Writers\StatusWriter;

class Code implements Report
Expand Down Expand Up @@ -358,10 +357,6 @@ public function generate(

echo $cachedData;

if ($toScreen === true && $interactive === false) {
Timing::printRunTime();
}

}//end generate()


Expand Down
5 changes: 0 additions & 5 deletions src/Reports/Full.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace PHP_CodeSniffer\Reports;

use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Util\Timing;

class Full implements Report
{
Expand Down Expand Up @@ -250,10 +249,6 @@ public function generate(

echo $cachedData;

if ($toScreen === true && $interactive === false) {
Timing::printRunTime();
}

}//end generate()


Expand Down
5 changes: 0 additions & 5 deletions src/Reports/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace PHP_CodeSniffer\Reports;

use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Util\Timing;

class Info implements Report
{
Expand Down Expand Up @@ -163,10 +162,6 @@ public function generate(

echo str_repeat('-', 70).PHP_EOL;

if ($toScreen === true && $interactive === false) {
Timing::printRunTime();
}

}//end generate()


Expand Down
5 changes: 0 additions & 5 deletions src/Reports/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace PHP_CodeSniffer\Reports;

use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Util\Timing;

class Source implements Report
{
Expand Down Expand Up @@ -266,10 +265,6 @@ public function generate(

echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL;

if ($toScreen === true && $interactive === false) {
Timing::printRunTime();
}

}//end generate()


Expand Down
5 changes: 0 additions & 5 deletions src/Reports/Summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace PHP_CodeSniffer\Reports;

use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Util\Timing;

class Summary implements Report
{
Expand Down Expand Up @@ -174,10 +173,6 @@ function ($keyA, $keyB) {

echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL;

if ($toScreen === true && $interactive === false) {
Timing::printRunTime();
}

}//end generate()


Expand Down
5 changes: 0 additions & 5 deletions src/Reports/VersionControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace PHP_CodeSniffer\Reports;

use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Util\Timing;

abstract class VersionControl implements Report
{
Expand Down Expand Up @@ -347,10 +346,6 @@ public function generate(

echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL;

if ($toScreen === true && $interactive === false) {
Timing::printRunTime();
}

}//end generate()


Expand Down
20 changes: 7 additions & 13 deletions src/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,9 @@ public function runPHPCS()
$numErrors = $this->run();

// Print all the reports for this run.
$toScreen = $this->reporter->printReports();

// Only print timer output if no reports were
// printed to the screen so we don't put additional output
// in something like an XML report. If we are printing to screen,
// the report types would have already worked out who should
// print the timer info.
if ($this->config->interactive === false
&& ($toScreen === false
|| (($this->reporter->totalErrors + $this->reporter->totalWarnings) === 0 && $this->config->showProgress === true))
) {
$this->reporter->printReports();

if ($this->config->quiet === false) {
Timing::printRunTime();
}
} catch (DeepExitException $e) {
Expand Down Expand Up @@ -215,8 +207,10 @@ public function runPHPCBF()
$this->run();
$this->reporter->printReports();

echo PHP_EOL;
Timing::printRunTime();
if ($this->config->quiet === false) {
StatusWriter::write('');
Timing::printRunTime();
}
} catch (DeepExitException $e) {
echo $e->getMessage();
return $e->getCode();
Expand Down