From 841f6d2d4327a4217d9c62a9b7c129e313ddb87f Mon Sep 17 00:00:00 2001 From: rubenvanassche Date: Fri, 1 Mar 2024 13:56:17 +0000 Subject: [PATCH] Fix styling --- src/Transformers/ClassTransformer.php | 2 +- src/Visitor/Visitor.php | 4 ++-- tests/Factories/TransformedFactory.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Transformers/ClassTransformer.php b/src/Transformers/ClassTransformer.php index bf41c61..3ef0a19 100644 --- a/src/Transformers/ClassTransformer.php +++ b/src/Transformers/ClassTransformer.php @@ -102,7 +102,7 @@ protected function getTypeScriptNode( protected function resolveTypeByAttribute( ReflectionClass $reflectionClass, - ReflectionProperty $property = null, + ?ReflectionProperty $property = null, ): ?TypeScriptNode { $subject = $property ?? $reflectionClass; diff --git a/src/Visitor/Visitor.php b/src/Visitor/Visitor.php index 7ea9db1..ad76249 100644 --- a/src/Visitor/Visitor.php +++ b/src/Visitor/Visitor.php @@ -26,7 +26,7 @@ public function __construct( public function before( Closure $closure, - array $allowedNodes = null, + ?array $allowedNodes = null, ): self { $this->beforeClosures[] = new VisitorClosure($closure, $allowedNodes); @@ -35,7 +35,7 @@ public function before( public function after( Closure $closure, - array $allowedNodes = null, + ?array $allowedNodes = null, ): self { $this->afterClosures[] = new VisitorClosure($closure, $allowedNodes); diff --git a/tests/Factories/TransformedFactory.php b/tests/Factories/TransformedFactory.php index b18f4b7..3b3776b 100644 --- a/tests/Factories/TransformedFactory.php +++ b/tests/Factories/TransformedFactory.php @@ -24,10 +24,10 @@ public function __construct( public static function alias( string $name, TypeScriptNode $typeScriptNode, - Reference $reference = null, - array $location = null, + ?Reference $reference = null, + ?array $location = null, bool $export = true, - array $references = null, + ?array $references = null, ): TransformedFactory { $reference = $reference ?? new CustomReference( 'factory_alias',