Skip to content

Commit

Permalink
fix: implicitly marked parameters as nullable is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Oct 9, 2024
1 parent d6ffae2 commit 4b87b78
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions phpmyfaq/src/phpMyFAQ/Faq/Statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct(private readonly Configuration $configuration)
*
* @param string|null $language Language
*/
public function totalFaqs(string $language = null): int
public function totalFaqs(?string $language = null): int
{
$now = date('YmdHis');

Expand Down Expand Up @@ -186,7 +186,7 @@ public function getTrending(): array
* @param int $count Number of records
* @param string $language Language
*/
public function getLatestData(int $count = PMF_NUMBER_RECORDS_LATEST, $language = null): array
public function getLatestData(int $count = PMF_NUMBER_RECORDS_LATEST, ?string $language = null): array
{
global $sids;

Expand Down Expand Up @@ -295,7 +295,7 @@ public function getLatestData(int $count = PMF_NUMBER_RECORDS_LATEST, $language
* @param string|null $language Language
* @return array
*/
public function getTrendingData(int $count = PMF_NUMBER_RECORDS_TRENDING, string $language = null): array
public function getTrendingData(int $count = PMF_NUMBER_RECORDS_TRENDING, ?string $language = null): array
{
$now = date('YmdHis');
$queryHelper = new QueryHelper($this->user, $this->groups);
Expand Down Expand Up @@ -404,7 +404,7 @@ public function getTrendingData(int $count = PMF_NUMBER_RECORDS_TRENDING, string
public function getTopTenData(
int $count = PMF_NUMBER_RECORDS_TOPTEN,
int $categoryId = 0,
string $language = null
?string $language = null
): array {
global $sids;

Expand Down Expand Up @@ -520,10 +520,10 @@ public function getTopTenData(
/**
* This function generates data-set with the most voted FAQs.
*
* @param int $count Number of records
* @param int $count Number of records
* @param string|null $language Language
*/
public function getTopVotedData(int $count = PMF_NUMBER_RECORDS_TOPTEN, string $language = null): array
public function getTopVotedData(int $count = PMF_NUMBER_RECORDS_TOPTEN, ?string $language = null): array
{
global $sids;
$topten = [];
Expand Down

0 comments on commit 4b87b78

Please sign in to comment.