/** * Validate that bankgiro equals current bankgiro */ private function validateBankgiro(string $account, Node $node) { if ($account != $this->currentBankgiro) { $this->addError("Non-matching bankgiro number in %s (expecting: %s, found: %s) on line %s", $node->getType(), $this->currentBankgiro, $account, (string) $node->getLineNr()); } }
/** * Invoke callback registered with node type */ private function dispatch(Node $node) { if (isset($this->callbacks[$node->getType()])) { $this->callbacks[$node->getType()]($node); } }