@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | public static function getInstance($name) |
106 | 106 | { |
107 | 107 | if (!is_string($name)) { |
108 | - throw new \InvalidArgumentException('$name should be a string. a '.gettype($name). ' is given.'); |
|
108 | + throw new \InvalidArgumentException('$name should be a string. a '.gettype($name).' is given.'); |
|
109 | 109 | } |
110 | 110 | if (!isset(self::$timers[$name])) { |
111 | 111 | self::$timers[$name] = new self(); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $this->endLap(); |
155 | 155 | $this->status = self::STATUS_RUNNING; |
156 | 156 | $this->laps[] = [ |
157 | - 'name' => $name ? $name : count($this->laps) +1, |
|
157 | + 'name' => $name ? $name : count($this->laps) + 1, |
|
158 | 158 | 'start' => $this->getCurrentTime(), |
159 | 159 | 'end' => -1, |
160 | 160 | 'total' => -1, |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | if (empty($this->laps)) { |
170 | 170 | return; |
171 | 171 | } |
172 | - $lapIndex = count($this->laps) -1; |
|
172 | + $lapIndex = count($this->laps) - 1; |
|
173 | 173 | $this->laps[$lapIndex]['end'] = $this->getCurrentTime(); |
174 | 174 | $this->laps[$lapIndex]['total'] = $this->laps[$lapIndex]['end'] - $this->laps[$lapIndex]['start']; |
175 | 175 | } |