Full report available here: http://pareview.sh/pareview/httpgitdrupalorgprojectsearchapigit-7x-1x
I wasn't sure what to do with the undefined $key in SearchApiViewsCache::get_results_key(), so I switched it to $key_data['exposed_info'] = $_GET['exposed_info'];. Also a typo in variable name is a slight performance change in SearchApiHighlight::getFulltextFields().
Normally I just provide 1 patch, but due to the volume of code in this module, I'll try and keep all the whitespace/style fixes separate.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2134509-1--unused_parameters.patch | 2.32 KB | drunken monkey |
| #1 | 2134509-1--unused_variables.patch | 8.93 KB | drunken monkey |
| pareview-unused-variables-1.patch | 7.02 KB | kscheirer |
Comments
Comment #1
drunken monkeyThanks a lot for reporting these! I've also found a few more, those are included, too, in the attached revised patch.
Also, there are some unused function parameters – do we want to remove those, too? They are attached in a separate patch. (I didn't remove unused
$form_stateparameters for form functions, though, to make things (hopefully) clearer.)Further comments (also fixed in the first attached patch):
I think this can just be
list($query).OK, this is not only a style problem, but a bug in the code itself. The correct fix, however, is to move the statement a line down, after
$resultis initialized.In any case, thanks again for posting this! I'm always happy to improve the code quality of my modules – sadly, a lot of cruft has accumulated over the years (especially in the doc comments, due to evolving standards).
Comment #2
drunken monkeyCommitted.
Thanks again for your patch!