public function indexTables($a, $b, $hdr) { $this->ia->indexTable($a, $hdr); $this->ib->indexTable($b, $hdr); $this->hdr = $hdr; $good = 0; if (null == $this->ia->items) { throw new HException('null iterable'); } $__hx__it = $this->ia->items->keys(); while ($__hx__it->hasNext()) { unset($key); $key = $__hx__it->next(); $item_a = $this->ia->items->get($key); $spot_a = $item_a->lst->length; $item_b = $this->ib->items->get($key); $spot_b = 0; if ($item_b !== null) { $spot_b = $item_b->lst->length; } if ($spot_a === 1 && $spot_b === 1) { $good++; } unset($spot_b, $spot_a, $item_b, $item_a); } $this->quality = $good / Math::max(1.0, $a->get_height()); }