Skip to content

Commit fd4181e

Browse files
authored
Merge pull request #58 from sitegeist/php84Compatibility
BUGFIX: Make nullability explicit
2 parents 3cbd9fb + 29f35f5 commit fd4181e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Classes/Infrastructure/DeepL/DeepLTranslationService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ protected function getDeeplAuthenticationKey(): DeepLAuthenticationKey
220220
*
221221
* @return string
222222
*/
223-
public static function getEntryIdentifier(string $text, string $targetLanguage, string $sourceLanguage = null): string
223+
public static function getEntryIdentifier(string $text, string $targetLanguage, ?string $sourceLanguage = null): string
224224
{
225225
return sha1($text . $targetLanguage . $sourceLanguage);
226226
}
@@ -248,7 +248,7 @@ protected function getBrowser(): Browser
248248
protected function createRequest(
249249
string $endpoint,
250250
string $method = 'GET',
251-
string $body = null
251+
?string $body = null
252252
): ServerRequestInterface {
253253
$deeplAuthenticationKey = $this->getDeeplAuthenticationKey();
254254
$baseUri = $deeplAuthenticationKey->isFree ? $this->settings['baseUriFree'] : $this->settings['baseUri'];

0 commit comments

Comments
 (0)