Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
DebugInfoTrait | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__debugInfo | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace Wikimedia\DebugInfo; |
4 | |
5 | /** |
6 | * A trait for automatic __debugInfo() modifications. |
7 | * |
8 | * Recursion into properties is prevented if they have a @noVarDump annotation |
9 | * in their doc comment. See T277618. |
10 | * |
11 | * @since 1.40 |
12 | */ |
13 | trait DebugInfoTrait { |
14 | public function __debugInfo() { |
15 | return DumpUtils::objectToArray( $this ); |
16 | } |
17 | } |