public function scan(Entity $entity) { $names = $entity->bind(Primitive::getClass())->value(); $ch = $this->mkChan(); foreach ($names as $name) { $this->coll()->assessThreat($name, $ch); } $results = []; for ($i = 0; $i < count($names); $i++) { $results[] = $ch->get(); } return $this->prepareResults($results); }
public function scan(Entity $entity) { $names = $entity->bind(Primitive::getClass())->value(); $assessment = []; foreach ($names as $name) { $ch = $this->mkChan(); $this->coll()->assessThreat($name, $ch); $assessment[$name] = $ch; } $results = []; foreach ($assessment as $name => $ch) { $results[$name] = $ch->get(); } return $results; }