1 | <?php |
||||
2 | |||||
3 | namespace CWP\AgencyExtensions\Extensions; |
||||
4 | |||||
5 | use SilverStripe\Core\Extension; |
||||
6 | use SilverStripe\SiteConfig\SiteConfig; |
||||
7 | |||||
8 | /** |
||||
9 | * Class CWPPageExtension |
||||
10 | * |
||||
11 | * @property Page_Controller $owner |
||||
12 | */ |
||||
13 | class CWPPageExtension extends Extension |
||||
14 | { |
||||
15 | /** |
||||
16 | * See BasePage_Controller::results() |
||||
17 | * |
||||
18 | * @param CwpSearchResult $results |
||||
0 ignored issues
–
show
|
|||||
19 | * @param array $properties |
||||
20 | */ |
||||
21 | public function updateSearchResults(&$results, &$properties) |
||||
0 ignored issues
–
show
The parameter
$results is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
22 | { |
||||
23 | // Customise empty results |
||||
24 | $customNoSearchResultsText = SiteConfig::current_site_config()->NoSearchResults; |
||||
25 | if ($customNoSearchResultsText) { |
||||
26 | $properties['NoSearchResults'] = $customNoSearchResultsText; |
||||
27 | } |
||||
28 | |||||
29 | // Customise empty search |
||||
30 | $customEmptyText = SiteConfig::current_site_config()->EmptySearch; |
||||
31 | if ($customEmptyText) { |
||||
32 | $properties['EmptySearch'] = $customEmptyText; |
||||
33 | } |
||||
34 | } |
||||
35 | } |
||||
36 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths