Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/NodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ function (\PhpParser\Node\Const_ $const) {
* @return bool If true, this is the first declaration of this type with
* this name, so it can be safely included.
*/
private function count(string $type, string $name = null): bool
private function count(string $type, ?string $name = null): bool
{
assert(isset($this->counts[$type]), 'Expected valid `$type`');

Expand Down
2 changes: 1 addition & 1 deletion src/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function getDuplicates(): array
*
* @return string The pretty printed version.
*/
public function prettyPrint(PrettyPrinterAbstract $printer = null): string
public function prettyPrint(?PrettyPrinterAbstract $printer = null): string
{
if (!$printer) {
$printer = new Standard();
Expand Down
4 changes: 2 additions & 2 deletions src/StubsGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ public function __construct(int $symbols = self::DEFAULT, array $config = [])
* pretty-printed stubs.
*
* @param Finder $finder The set of files to generate (merged) stubs for.
* @param NodeVisitor $visitor The optional node visitor to override the default.
* @param NodeVisitor|null $visitor The optional node visitor to override the default.
*
* @return Result
*/
public function generate(Finder $finder, NodeVisitor $visitor = null): Result
public function generate(Finder $finder, ?NodeVisitor $visitor = null): Result
{
$parser = (new ParserFactory())->createForNewestSupportedVersion();

Expand Down