Inside the TitleSearch class the search method $maxResults parameter had no effect (#111).
public function search($searchTerms, $wantedTypes = null, $maxResults = null)
There is already an (open) PR (#162) but that is not efficient, because it will still loop through all search results and than just remove every unnecessary result to give back the desired number results.
This fix will stop the scraping after the results count reach the $maxResults value.
The default behaviour is to not limit the results count so this PR does not introduce breaking change.
Inside the
TitleSearch
class thesearch
method$maxResults
parameter had no effect (#111).There is already an (open) PR (#162) but that is not efficient, because it will still loop through all search results and than just remove every unnecessary result to give back the desired number results.
This fix will stop the scraping after the results count reach the
$maxResults
value. The default behaviour is to not limit the results count so this PR does not introduce breaking change.