Skip to content

Commit

Permalink
Add null, to prevent an uninitialized property error
Browse files Browse the repository at this point in the history
  • Loading branch information
msmakouz committed Apr 27, 2022
1 parent 2bde28b commit ba9b7cd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Console/src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ abstract class Command extends SymfonyCommand
// Short command description.
protected const DESCRIPTION = '';

// Command options specified in Symphony format. For more complex definitions redefine
// Command options specified in Symfony format. For more complex definitions redefine
// getOptions() method.
protected const OPTIONS = [];

// Command arguments specified in Symphony format. For more complex definitions redefine
// Command arguments specified in Symfony format. For more complex definitions redefine
// getArguments() method.
protected const ARGUMENTS = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Router/src/AbstractRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abstract class AbstractRoute implements RouteInterface
use DefaultsTrait;

protected UriHandler $uriHandler;
protected ?array $matches;
protected ?array $matches = null;

public function __construct(
protected string $pattern,
Expand Down
2 changes: 1 addition & 1 deletion src/Session/src/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class Session implements SessionInterface
*/
private const DEFAULT_SECTION = '_DEFAULT';

private ?string $id;
private ?string $id = null;
private bool $started = false;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Streams/src/StreamWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class StreamWrapper
*
* @var resource
*/
public mixed $context;
public mixed $context = null;

private static bool $registered = false;

Expand Down

0 comments on commit ba9b7cd

Please sign in to comment.