Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 6
DestructTracerNode
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 5
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
 __destruct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
<?php
namespace Wikimedia\RemexHtml\TreeBuilder;
class DestructTracerNode {
    private $callback;
    private $tag;
    public function __construct( $callback, $tag ) {
        $this->callback = $callback;
        $this->tag = $tag;
    }
    public function __destruct() {
        call_user_func( $this->callback, "[Destruct] {$this->tag}" );
    }
}
// Retain the old namespace for backwards compatibility.
class_alias( DestructTracerNode::class, 'RemexHtml\TreeBuilder\DestructTracerNode' );