mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 17:52:43 +01:00
c896aeb62e
Summary: Apply various linter fixes. Test Plan: Unit tests + eyeballing. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: hach-que, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12390
30 lines
678 B
PHP
30 lines
678 B
PHP
<?php
|
|
|
|
final class CelerityResourceGraph extends AbstractDirectedGraph {
|
|
|
|
private $resourceGraph = array();
|
|
private $graphSet = false;
|
|
|
|
protected function loadEdges(array $nodes) {
|
|
if (!$this->graphSet) {
|
|
throw new PhutilInvalidStateException('setResourceGraph');
|
|
}
|
|
|
|
$graph = $this->getResourceGraph();
|
|
$edges = array();
|
|
foreach ($nodes as $node) {
|
|
$edges[$node] = idx($graph, $node, array());
|
|
}
|
|
return $edges;
|
|
}
|
|
|
|
public function setResourceGraph(array $graph) {
|
|
$this->resourceGraph = $graph;
|
|
$this->graphSet = true;
|
|
return $this;
|
|
}
|
|
|
|
private function getResourceGraph() {
|
|
return $this->resourceGraph;
|
|
}
|
|
}
|