Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Dec 11, 2024
1 parent 67dbf48 commit 3155c4b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
],
"require": {
"php": ">=8.1",
"spiral/core": "^3.15",
"spiral/logger": "^3.15",
"spiral/tokenizer": "^3.15",
"spiral/core": "^3.14.8",
"spiral/logger": "^3.14.8",
"spiral/tokenizer": "^3.14.8",
"symfony/translation": "^5.1 || ^6.0 || ^7.0",
"psr/event-dispatcher": "^1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Catalogue/CatalogueManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class CatalogueManager implements CatalogueManagerInterface

public function __construct(
private readonly LoaderInterface $loader,
CacheInterface $cache = null
?CacheInterface $cache = null
) {
$this->cache = $cache ?? new NullCache();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/LocaleException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LocaleException extends TranslatorException
public function __construct(
protected string $locale,
int $code = 0,
\Throwable $previous = null
?\Throwable $previous = null
) {
parent::__construct(\sprintf('Undefined locale \'%s\'', $locale), $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/TranslatorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ trait TranslatorTrait
*
* @throws ScopeException
*/
protected function say(string $string, array $options = [], string $bundle = null): string
protected function say(string $string, array $options = [], ?string $bundle = null): string
{
if (Translator::isMessage($string)) {
//Cut [[ and ]]
Expand Down
6 changes: 3 additions & 3 deletions src/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getCatalogueManager(): CatalogueManagerInterface
*
* @throws LocaleException
*/
public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null): string
public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
$domain ??= $this->config->getDefaultDomain();
$locale ??= $this->locale;
Expand All @@ -88,8 +88,8 @@ public function transChoice(
string $id,
string|int $number,
array $parameters = [],
string $domain = null,
string $locale = null
?string $domain = null,
?string $locale = null
): string {
$domain ??= $this->config->getDefaultDomain();
$locale ??= $this->locale;
Expand Down
4 changes: 2 additions & 2 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @throws TranslatorException
* @throws ScopeException
*/
function l(string $string, array $options = [], string $domain = null): string
function l(string $string, array $options = [], ?string $domain = null): string
{
/** @psalm-suppress InternalMethod */
$container = ContainerScope::getContainer();
Expand Down Expand Up @@ -47,7 +47,7 @@ function l(string $string, array $options = [], string $domain = null): string
* @throws TranslatorException
* @throws ScopeException
*/
function p(string $string, int $number, array $options = [], string $domain = null): string
function p(string $string, int $number, array $options = [], ?string $domain = null): string
{
/** @psalm-suppress InternalMethod */
$container = ContainerScope::getContainer();
Expand Down
2 changes: 1 addition & 1 deletion tests/TraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TraitTest extends TestCase
use TranslatorTrait;

/**
* @var \PHPUnit\Framework\MockObject\MockObject|ContainerInterface
* @var \PHPUnit_Framework_MockObject_MockObject|ContainerInterface
*/
private $container;

Expand Down

0 comments on commit 3155c4b

Please sign in to comment.