/** * Tries to restore the metrics for a cached node. If this method has * restored the metrics it will return <b>TRUE</b>, otherwise the return * value will be <b>FALSE</b>. * * @param \PDepend\Source\AST\AbstractASTArtifact $node * @return boolean */ protected function restoreFromCache(AbstractASTArtifact $node) { $id = $node->getId(); if ($node->isCached() && isset($this->metricsCached[$id])) { $this->metrics[$id] = $this->metricsCached[$id]; return true; } return false; }