1 | <?php |
||
10 | class EntitySearchMain extends Model |
||
11 | { |
||
12 | public $results = []; |
||
13 | public $query; |
||
14 | |||
15 | private $_configs; |
||
16 | |||
17 | /** |
||
18 | * EntitySearchMain constructor. Pass query inside |
||
19 | * @param string $query |
||
20 | * @param array|null $configs |
||
21 | */ |
||
22 | public function __construct($query, array $configs = null) |
||
28 | |||
29 | /** |
||
30 | * Try to search in classic apps |
||
31 | */ |
||
32 | public function make() |
||
42 | |||
43 | /** |
||
44 | * Get sorted by relevance search response. Method return result as array: [relevance => [title, snippet, uri, date], ...] |
||
45 | * @return array |
||
46 | */ |
||
47 | public function getRelevanceSortedResult() |
||
77 | |||
78 | /** |
||
79 | * Highlight words in text by current query request. |
||
80 | * @param string $text |
||
81 | * @param string $tag |
||
82 | * @param array $properties |
||
83 | * @return string |
||
84 | */ |
||
85 | public function highlightText($text, $tag, array $properties = []) |
||
97 | |||
98 | |||
99 | } |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.