Statistics are additional information about a class/object, that will be displayed in the var_dump output in the key __statistics.
#[AddStatistic(PropertyCount::class)]
class Test
{
use ModifiedDump;
private $a;
}To use multiple statistics, just use multiple AddStatistic attributes.
Statistics have to implement the interface \Berbeflo\ModifyDump\Statistic\Statistic, which defines the methods createStatistic, which returns the statistic data and getStatisticIdentifier, which returns the array key to be used for the statistic.
It also defines the method create which must return the filter instance.
Pass the full qualified class name of the statistic class to the #[AddStatistic] attribute.
Shows the number of properties, defined in the class