Пример #1
0
 public function analyzeGraphs(array $graphs)
 {
     $components = $this->preProcess($graphs);
     $components = $this->computeTypeMatrix($components);
     $components['typeResolver'] = new TypeResolver($components);
     echo "Determining Variable Types\n";
     $typeReconstructor = new TypeReconstructor();
     $typeReconstructor->resolve($components);
     return $components;
 }
Пример #2
0
 public function analyzeGraphs($graphs)
 {
     $components = $this->preProcess($graphs);
     $components = $this->computeTypeMatrix($components);
     $components['typeResolver'] = new TypeResolver($components);
     echo "Determining Variable Types\n";
     $typeReconstructor = new TypeReconstructor();
     $typeReconstructor->resolve($components);
     $errors = [];
     foreach ($this->rules as $rule) {
         echo "Executing rule: " . $rule->getName() . "\n";
         $errors = array_merge($errors, $rule->execute($components));
     }
     return $errors;
 }