Skip to content

Commit

Permalink
Add native parameter and return types
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Jun 18, 2024
1 parent 86d176c commit 7da8cf1
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions src/TranslatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,21 @@ interface TranslatorInterface
{
/**
* Translate a message.
*
* @param string $message
* @param string $textDomain
* @param string $locale
* @return string
*/
public function translate($message, $textDomain = 'default', $locale = null);
public function translate(
string $message,
string $textDomain = 'default',
?string $locale = null,
): string;

/**
* Translate a plural message.
*
* @param string $singular
* @param string $plural
* @param int $number
* @param string $textDomain
* @param string|null $locale
* @return string
*/
public function translatePlural(
$singular,
$plural,
$number,
$textDomain = 'default',
$locale = null
);
string $singular,
string $plural,
int $number,
string $textDomain = 'default',
?string $locale = null
): string;
}

0 comments on commit 7da8cf1

Please sign in to comment.