Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Placeholder | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Wikimedia\DebugInfo; |
| 4 | |
| 5 | /** |
| 6 | * A class used for replacing large objects in var_dump() output. |
| 7 | * |
| 8 | * @since 1.40 |
| 9 | */ |
| 10 | class Placeholder { |
| 11 | /** @var string A description of the replaced object */ |
| 12 | public $desc; |
| 13 | |
| 14 | /** |
| 15 | * @param mixed $value |
| 16 | */ |
| 17 | public function __construct( $value ) { |
| 18 | if ( is_object( $value ) ) { |
| 19 | $this->desc = get_class( $value ) . '#' . spl_object_id( $value ); |
| 20 | } else { |
| 21 | $this->desc = get_debug_type( $value ); |
| 22 | } |
| 23 | } |
| 24 | } |