Skip to content

Commit acfee11

Browse files
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
1 parent acd3186 commit acfee11

File tree

13 files changed

+13
-13
lines changed

13 files changed

+13
-13
lines changed

Caster/Caster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Caster
4242
*
4343
* @param bool $hasDebugInfo Whether the __debugInfo method exists on $obj or not
4444
*/
45-
public static function castObject(object $obj, string $class, bool $hasDebugInfo = false, string $debugClass = null): array
45+
public static function castObject(object $obj, string $class, bool $hasDebugInfo = false, ?string $debugClass = null): array
4646
{
4747
if ($hasDebugInfo) {
4848
try {

Caster/LinkStub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class LinkStub extends ConstStub
2323
private static $vendorRoots;
2424
private static $composerRoots;
2525

26-
public function __construct(string $label, int $line = 0, string $href = null)
26+
public function __construct(string $label, int $line = 0, ?string $href = null)
2727
{
2828
$this->value = $label;
2929

Caster/TraceStub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TraceStub extends Stub
2525
public $sliceLength;
2626
public $numberingOffset;
2727

28-
public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, int $sliceLength = null, int $numberingOffset = 0)
28+
public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, ?int $sliceLength = null, int $numberingOffset = 0)
2929
{
3030
$this->value = $trace;
3131
$this->keepArgs = $keepArgs;

Cloner/AbstractCloner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ abstract class AbstractCloner implements ClonerInterface
216216
*
217217
* @see addCasters
218218
*/
219-
public function __construct(array $casters = null)
219+
public function __construct(?array $casters = null)
220220
{
221221
if (null === $casters) {
222222
$casters = static::$defaultCasters;

Dumper/AbstractDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
4242
* @param string|null $charset The default character encoding to use for non-UTF8 strings
4343
* @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation
4444
*/
45-
public function __construct($output = null, string $charset = null, int $flags = 0)
45+
public function __construct($output = null, ?string $charset = null, int $flags = 0)
4646
{
4747
$this->flags = $flags;
4848
$this->setCharset($charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8');

Dumper/CliDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CliDumper extends AbstractDumper
6464
/**
6565
* {@inheritdoc}
6666
*/
67-
public function __construct($output = null, string $charset = null, int $flags = 0)
67+
public function __construct($output = null, ?string $charset = null, int $flags = 0)
6868
{
6969
parent::__construct($output, $charset, $flags);
7070

Dumper/ContextProvider/SourceContextProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class SourceContextProvider implements ContextProviderInterface
3030
private $projectDir;
3131
private $fileLinkFormatter;
3232

33-
public function __construct(string $charset = null, string $projectDir = null, FileLinkFormatter $fileLinkFormatter = null, int $limit = 9)
33+
public function __construct(?string $charset = null, ?string $projectDir = null, ?FileLinkFormatter $fileLinkFormatter = null, int $limit = 9)
3434
{
3535
$this->charset = $charset;
3636
$this->projectDir = $projectDir;

Dumper/HtmlDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class HtmlDumper extends CliDumper
7777
/**
7878
* {@inheritdoc}
7979
*/
80-
public function __construct($output = null, string $charset = null, int $flags = 0)
80+
public function __construct($output = null, ?string $charset = null, int $flags = 0)
8181
{
8282
AbstractDumper::__construct($output, $charset, $flags);
8383
$this->dumpId = 'sf-dump-'.mt_rand();

Dumper/ServerDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ServerDumper implements DataDumperInterface
3030
* @param DataDumperInterface|null $wrappedDumper A wrapped instance used whenever we failed contacting the server
3131
* @param ContextProviderInterface[] $contextProviders Context providers indexed by context name
3232
*/
33-
public function __construct(string $host, DataDumperInterface $wrappedDumper = null, array $contextProviders = [])
33+
public function __construct(string $host, ?DataDumperInterface $wrappedDumper = null, array $contextProviders = [])
3434
{
3535
$this->connection = new Connection($host, $contextProviders);
3636
$this->wrappedDumper = $wrappedDumper;

Server/DumpServer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class DumpServer
3232
*/
3333
private $socket;
3434

35-
public function __construct(string $host, LoggerInterface $logger = null)
35+
public function __construct(string $host, ?LoggerInterface $logger = null)
3636
{
3737
if (!str_contains($host, '://')) {
3838
$host = 'tcp://'.$host;

0 commit comments

Comments
 (0)