Skip to content

Commit

Permalink
Merge 184aa8b into 67edf72
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejkupczyk committed Oct 20, 2020
2 parents 67edf72 + 184aa8b commit ef782b7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/tasks/File.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $this->taskConcat([
## Replace


Performs search and replace inside a files.
Performs search and replace inside a file.

``` php
<?php
Expand Down
9 changes: 7 additions & 2 deletions src/Common/TimeKeeper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ class TimeKeeper
const DAY = 86400;

/**
* @var float
* @var float|null
*/
protected $startedAt;

/**
* @var float
* @var float|null
*/
protected $finishedAt;

Expand All @@ -32,6 +32,11 @@ public function stop()
$this->finishedAt = microtime(true);
}

public function reset()
{
$this->startedAt = $this->finishedAt = null;
}

/**
* @return float|null
*/
Expand Down
7 changes: 6 additions & 1 deletion src/Common/Timer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
trait Timer
{
/**
* @var \Robo\Common\TimeKeeper
* @var \Robo\Common\TimeKeeper|null
*/
protected $timer;

Expand All @@ -25,6 +25,11 @@ protected function stopTimer()
$this->timer->stop();
}

protected function resetTimer()
{
$this->timer->reset();
}

/**
* @return float|null
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Task/File/Replace.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Robo\Task\BaseTask;

/**
* Performs search and replace inside a files.
* Performs search and replace inside a file.
*
* ``` php
* <?php
Expand Down

0 comments on commit ef782b7

Please sign in to comment.