Skip to content

Commit 8a0f1c4

Browse files
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
1 parent 65e08db commit 8a0f1c4

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

Cache/CacheInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ interface CacheInterface
4242
*
4343
* @throws InvalidArgumentException When $key is not valid or when $beta is negative
4444
*/
45-
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null);
45+
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null);
4646

4747
/**
4848
* Removes an item from the pool.

Cache/CacheTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ trait CacheTrait
3030
*
3131
* @return mixed
3232
*/
33-
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
33+
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null)
3434
{
3535
return $this->doGet($this, $key, $callback, $beta, $metadata);
3636
}
@@ -43,7 +43,7 @@ public function delete(string $key): bool
4343
return $this->deleteItem($key);
4444
}
4545

46-
private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null, LoggerInterface $logger = null)
46+
private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, ?array &$metadata = null, ?LoggerInterface $logger = null)
4747
{
4848
if (0 > $beta = $beta ?? 1.0) {
4949
throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException { };

EventDispatcher/EventDispatcherInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ interface EventDispatcherInterface extends PsrEventDispatcherInterface
2727
*
2828
* @return object The passed $event MUST be returned
2929
*/
30-
public function dispatch(object $event, string $eventName = null): object;
30+
public function dispatch(object $event, ?string $eventName = null): object;
3131
}

HttpClient/HttpClientInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ public function request(string $method, string $url, array $options = []): Respo
9191
* @param ResponseInterface|iterable<array-key, ResponseInterface> $responses One or more responses created by the current HTTP client
9292
* @param float|null $timeout The idle timeout before yielding timeout chunks
9393
*/
94-
public function stream($responses, float $timeout = null): ResponseStreamInterface;
94+
public function stream($responses, ?float $timeout = null): ResponseStreamInterface;
9595
}

HttpClient/ResponseInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,5 @@ public function cancel(): void;
105105
* @return mixed An array of all available info, or one of them when $type is
106106
* provided, or null when an unsupported type is requested
107107
*/
108-
public function getInfo(string $type = null);
108+
public function getInfo(?string $type = null);
109109
}

Translation/TranslatableInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
*/
1717
interface TranslatableInterface
1818
{
19-
public function trans(TranslatorInterface $translator, string $locale = null): string;
19+
public function trans(TranslatorInterface $translator, ?string $locale = null): string;
2020
}

Translation/TranslatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ interface TranslatorInterface
6363
*
6464
* @throws \InvalidArgumentException If the locale contains invalid characters
6565
*/
66-
public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null);
66+
public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null);
6767
}

Translation/TranslatorTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function getLocale()
4343
/**
4444
* {@inheritdoc}
4545
*/
46-
public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string
46+
public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
4747
{
4848
if (null === $id || '' === $id) {
4949
return '';

0 commit comments

Comments
 (0)