1 | <?php |
||
14 | class Index |
||
15 | { |
||
16 | /** |
||
17 | * @var LuceneIndex |
||
18 | */ |
||
19 | private $index; |
||
20 | |||
21 | /** |
||
22 | * @var string|boolean $path |
||
23 | */ |
||
24 | protected $path; |
||
25 | |||
26 | /** |
||
27 | * @var Filter |
||
28 | */ |
||
29 | protected $filter; |
||
30 | |||
31 | /** |
||
32 | * Index constructor. |
||
33 | * |
||
34 | * @param Filter $filter |
||
35 | */ |
||
36 | 29 | public function __construct(Filter $filter) |
|
40 | |||
41 | /** |
||
42 | * Open |
||
43 | * |
||
44 | * @param string|boolean $path |
||
45 | * @param bool $forceCreate |
||
46 | * @return $this |
||
47 | * @throws ExceptionInterface |
||
48 | * @throws \Exception |
||
49 | */ |
||
50 | 9 | public function open($path = false, $forceCreate = true) |
|
57 | |||
58 | /** |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function close() |
||
66 | |||
67 | /** |
||
68 | * @param integer $limit |
||
69 | * @return $this |
||
70 | */ |
||
71 | 1 | public function limit($limit) |
|
76 | |||
77 | /** |
||
78 | * Create Index |
||
79 | * |
||
80 | * Extends the Lucene "open" method to create the index if it doesn't exist. |
||
81 | * |
||
82 | * @param string|boolean $path |
||
83 | * @param boolean $forceCreate |
||
84 | * @return SearchIndexInterface |
||
85 | * @throws \Exception |
||
86 | */ |
||
87 | 8 | private function createIndex($path, $forceCreate = true) |
|
101 | |||
102 | /** |
||
103 | * @param $path |
||
104 | */ |
||
105 | 23 | public function setPath($path) |
|
109 | |||
110 | /** |
||
111 | * @return string |
||
112 | * @throws \Exception |
||
113 | */ |
||
114 | 9 | protected function path() |
|
122 | |||
123 | /** |
||
124 | * @return LuceneIndex |
||
125 | */ |
||
126 | 5 | public function get() |
|
130 | } |
||
131 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..