/** * @param TaxonInterface $taxon * * @return callable|null */ private function getFilterTaxonOption(TaxonInterface $taxon) { if (null === $taxon->getId()) { return null; } return function (TaxonInterface $entry) use($taxon) { return $entry->getId() !== $taxon->getId(); }; }
/** * Get the closure to filter taxon collection. * * @param TaxonInterface $taxon * * @return callable|null */ private function getFilterTaxonOption(TaxonInterface $taxon) { $closure = null; if (null !== $taxon->getId()) { $closure = function ($entry) use($taxon) { return $entry->getId() != $taxon->getId(); }; } return $closure; }
function it_does_reverse_transform_array_of_arrays_value(TaxonInterface $entityThree, TaxonInterface $entityFour) { $entityThree->getId()->willReturn(3); $entityFour->getId()->willReturn(4); $this->reverseTransform(array(array($entityThree, $entityFour)))->shouldHaveCount(2); }
/** * @When /^I am browsing products from ("([^"]+)" taxon)$/ */ public function iAmBrowsingProductsFromTaxon(TaxonInterface $taxon) { $this->indexPerTaxonPage->open(['taxonId' => $taxon->getId()]); }