Skip to content

Commit 02338c2

Browse files
committed
File: add getListenerTimes() method
... to allow for access to the recorded listener times from within a report class.
1 parent b5b07c6 commit 02338c2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Files/File.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ class File
209209
* An array of sniffs being processed and how long they took.
210210
*
211211
* @var array
212+
* @see getListenerTimes()
212213
*/
213214
protected $listenerTimes = [];
214215

@@ -1232,6 +1233,18 @@ public function getMetrics()
12321233
}//end getMetrics()
12331234

12341235

1236+
/**
1237+
* Returns the time taken processing this file for each invoked sniff.
1238+
*
1239+
* @return array
1240+
*/
1241+
public function getListenerTimes()
1242+
{
1243+
return $this->listenerTimes;
1244+
1245+
}//end getListenerTimes()
1246+
1247+
12351248
/**
12361249
* Returns the absolute filename of this file.
12371250
*

0 commit comments

Comments
 (0)