Total Complexity | 7 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class TextHelpers |
||
6 | { |
||
7 | |||
8 | /** |
||
9 | * Return the estimated reading time for a given piece of $content in minutes. |
||
10 | * |
||
11 | * Average reading speed is between 230-280 words per minute, |
||
12 | * so he using 200 here is keeping some limit to provide pessimistic reading time. |
||
13 | * Most of people should read it faster. |
||
14 | * |
||
15 | * @param string $content Content to calculate read time for. |
||
16 | * @param int $wpm Estimated words per minute of reader. |
||
17 | * |
||
18 | * @return string estimated read time eg. 1 minute, 30 seconds |
||
19 | */ |
||
20 | public static function estimateReadingTime( |
||
53 |