protected function addCall($method, $args) { if (!isset($this->call_counts[$method])) { $this->call_counts[$method] = 0; } $this->call_counts[$method]++; }