function account(AssignmentCountSet $deltarev) { $k = $this->type; if ($this->cid > 0 && ($k === "lead" || $k === "shepherd")) { $deltarev->{$k} = true; $ct = $deltarev->ensure($this->cid); ++$ct->ass; $ct->{$k} += $this->isadd ? 1 : -1; } }