Skip to content

Commit

Permalink
refactor: corrected types
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Mar 30, 2024
1 parent 5336353 commit 042286a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion phpmyfaq/src/phpMyFAQ/Search/AbstractSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract class AbstractSearch
*
* @var stdClass[]
*/
protected $resultSet;
protected mixed $resultSet;

/**
* AbstractSearch constructor.
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/src/phpMyFAQ/Search/SearchDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function search(string $searchTerm): mixed
FROM
%s %s %s
WHERE
%s = %d',
%s = %s',
$this->getResultColumns(),
$this->getTable(),
$this->getJoinedTable(),
Expand Down
4 changes: 2 additions & 2 deletions phpmyfaq/src/phpMyFAQ/Search/SearchFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class SearchFactory
/**
* Factory for generating search instances.
*
* @param string[] $searchHandler Array with search handlers, e.g. array('database' => 'mysqli')
* @param string[] $searchHandler Array with search handlers, e.g., array ('database' => 'mysqli')
*/
public static function create(Configuration $configuration, array $searchHandler): DatabaseInterface
public static function create(Configuration $configuration, array $searchHandler): SearchDatabase
{
$searchClass = sprintf(
'\phpMyFAQ\Search\%s\%s',
Expand Down
2 changes: 2 additions & 0 deletions tests/phpMyFAQ/RelationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public function testGetAllRelatedByQuestion(): void
$dbHandle = new Sqlite3();
$dbHandle->connect(PMF_TEST_DIR . '/test.db', '', '');
$configuration = new Configuration($dbHandle);
$configuration->set('search.enableRelevance', false);

$language = new Language($configuration);
$language->setLanguage(false, 'en');
$configuration->setLanguage($language);
Expand Down

0 comments on commit 042286a

Please sign in to comment.