Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
UseStringForResource | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
countFromResource | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | namespace Apie\CountWords\Strategies\Concerns; |
3 | |
4 | trait UseStringForResource |
5 | { |
6 | public static function countFromResource(mixed $resource, array $counts = []): array |
7 | { |
8 | @rewind($resource); |
9 | return self::countFromString(stream_get_contents($resource), $counts); |
10 | } |
11 | } |