Ran
|
Jobs
6
|
Files
68
|
Run time
15min
|
Badge
Embed ▾
README BADGES
|
travis-ci
:sparkles: PHP 7.0: New sniff to detect generator return expressions > Generator Return Expressions > > This feature builds upon the generator functionality introduced into PHP 5.5. It enables for a `return` statement to be used within a generator to enable for a final expression to be returned (return by reference is not allowed). > This value can be fetched using the new `Generator::getReturn()` method, which may only be used once the generator has finished yielding values. Refs: * http://php.net/manual/en/migration70.new-features.php#migration70.new-features.generator-return-expressions * https://wiki.php.net/rfc/generator-return-expressions > https://github.com/php/php-src/commit/5c230baf7 The new sniff checks for and reports on `return` statements being found in generator functions. Includes unit tests.
30 of 30 new or added lines in 1 file covered. (100.0%)
2675 of 2759 relevant lines covered (96.96%)
31.97 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
4 |
97.3 |
PHPCompatibility/Sniffs/PHP/NewGeneratorReturnSniff.php |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|