Skip to content

Commit 8bb2eb1

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

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

@@ -1216,6 +1217,18 @@ public function getMetrics()
12161217
}//end getMetrics()
12171218

12181219

1220+
/**
1221+
* Returns the time taken processing this file for each invoked sniff.
1222+
*
1223+
* @return array
1224+
*/
1225+
public function getListenerTimes()
1226+
{
1227+
return $this->listenerTimes;
1228+
1229+
}//end getListenerTimes()
1230+
1231+
12191232
/**
12201233
* Returns the absolute filename of this file.
12211234
*

0 commit comments

Comments
 (0)