Skip to content

Commit 0506681

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

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

@@ -1210,6 +1211,18 @@ public function getMetrics()
12101211
}//end getMetrics()
12111212

12121213

1214+
/**
1215+
* Returns the time taken processing this file for each invoked sniff.
1216+
*
1217+
* @return array
1218+
*/
1219+
public function getListenerTimes()
1220+
{
1221+
return $this->listenerTimes;
1222+
1223+
}//end getListenerTimes()
1224+
1225+
12131226
/**
12141227
* Returns the absolute filename of this file.
12151228
*

0 commit comments

Comments
 (0)