Skip to content

Commit

Permalink
(phan) Fix Phan warning
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardspec committed Jan 11, 2025
1 parent d2f7549 commit 62dfe45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/ParagraphExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,11 @@ public function findSnippet( $textToFind ) {
* @param string[] $words Full prompt, e.g. [ "Sentence", "consists", "of", "words." ].
* @param string[] $paragraphs Paragraphs to be searched.
* @param string $oldQuery Previously found string, e.g. "Sequential words can form a".
* @return mixed Search result. If not null ("not found"), contains the following keys:
* @return ?array Search result. If not null ("not found"), contains the following keys:
* string query Longest sequence of words from "words" array that have been found.
* string[] paragraphs Paragraphs where "query" was found.
* string[] leftoverWords Remaining words from "words" array that haven't been found yet.
* @phan-return ?array{query:string,paragraphs:non-empty-associative-array<string>,leftoverWords:string[]}
*/
protected function findWordsRecursive( array $words, array $paragraphs, $oldQuery = '' ) {
if ( !$words ) {
Expand Down

0 comments on commit 62dfe45

Please sign in to comment.