1 | <?php |
||
10 | class ResultsGenerator implements LoggerAwareInterface, ResultsGeneratorInterface |
||
11 | { |
||
12 | use LoggerAwareTrait; |
||
13 | |||
14 | /** |
||
15 | * Default sorting method because it's ideal for getting consistent paging |
||
16 | * results. |
||
17 | */ |
||
18 | const SORT_CREATION_DATE_ASC = 'creationdate asc'; |
||
19 | |||
20 | /** |
||
21 | * @var SearchServiceInterface |
||
22 | */ |
||
23 | private $searchService; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $sorting; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | private $pageSize; |
||
34 | |||
35 | /** |
||
36 | * @param SearchServiceInterface $searchService |
||
37 | * @param string $sorting |
||
38 | * @param int $pageSize |
||
39 | */ |
||
40 | public function __construct( |
||
54 | |||
55 | /** |
||
56 | * @param string $sorting |
||
57 | * @return ResultsGenerator |
||
58 | */ |
||
59 | public function withSorting($sorting) |
||
65 | |||
66 | /** |
||
67 | * @return string |
||
68 | */ |
||
69 | public function getSorting() |
||
73 | |||
74 | /** |
||
75 | * @param string $pageSize |
||
76 | * @return ResultsGenerator |
||
77 | */ |
||
78 | public function withPageSize($pageSize) |
||
84 | |||
85 | /** |
||
86 | * @return int |
||
87 | */ |
||
88 | public function getPageSize() |
||
92 | |||
93 | /** |
||
94 | * @param string $query |
||
95 | * @return \Iterator |
||
96 | */ |
||
97 | public function search($query) |
||
135 | } |
||
136 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.