@@ -1,11 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | use SMW\DataValueFactory; |
4 | -use SMW\InTextAnnotationParser; |
|
5 | 4 | use SMW\Query\PrintRequest; |
6 | 5 | use SMW\Query\Result\EntityListAccumulator; |
7 | 6 | use SMWDataItem as DataItem; |
8 | -use SMWDIBlob as DIBlob; |
|
9 | 7 | use SMW\Query\Result\ResultFieldMatchFinder; |
10 | 8 | use SMW\Query\QueryToken; |
11 | 9 |
@@ -108,7 +108,6 @@ discard block |
||
108 | 108 | * |
109 | 109 | * @since 2.5 |
110 | 110 | * |
111 | - * @param string $text |
|
112 | 111 | */ |
113 | 112 | public function canHighlight( $canHighlight ) { |
114 | 113 | $this->canHighlight = strpos( strtolower( $canHighlight ), '-hl' ) !== false; |
@@ -131,6 +130,10 @@ discard block |
||
131 | 130 | return $this->doHighlight( $text, $type, array_keys( $this->tokens ) ); |
132 | 131 | } |
133 | 132 | |
133 | + /** |
|
134 | + * @param string $text |
|
135 | + * @param string $type |
|
136 | + */ |
|
134 | 137 | private function doHighlight( $text, $type, $tokens ) { |
135 | 138 | |
136 | 139 | if ( $type === self::HL_BOLD ) { |
@@ -150,6 +153,9 @@ discard block |
||
150 | 153 | return preg_replace( $pattern, $replacement, $text ); |
151 | 154 | } |
152 | 155 | |
156 | + /** |
|
157 | + * @param string $text |
|
158 | + */ |
|
153 | 159 | private function addTokensFromText( $text ) { |
154 | 160 | |
155 | 161 | // Remove query related chars |