Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed May 31, 2024
1 parent ccb8af1 commit 53cd8d4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 0 additions & 3 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@
<code><![CDATA[getSubNodeNames]]></code>
<code><![CDATA[traverse]]></code>
</ImpureMethodCall>
<MoreSpecificReturnType>
<code><![CDATA[non-empty-string|null]]></code>
</MoreSpecificReturnType>
<PropertyTypeCoercion>
<code><![CDATA[$endLine]]></code>
<code><![CDATA[$startLine]]></code>
Expand Down
9 changes: 8 additions & 1 deletion src/Reflection/ReflectionFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class ReflectionFunction implements Reflection

private bool $isStatic;

/**
* @param non-empty-string|null $namespace
*/
private function __construct(
private Reflector $reflector,
Node\Stmt\ClassMethod|Node\Stmt\Function_|Node\Expr\Closure|Node\Expr\ArrowFunction $node,
Expand Down Expand Up @@ -76,7 +79,11 @@ public function __toString(): string
return ReflectionFunctionStringCast::toString($this);
}

/** @internal */
/**
* @internal
*
* @param non-empty-string|null $namespace
*/
public static function createFromNode(
Reflector $reflector,
Node\Stmt\Function_|Node\Expr\Closure|Node\Expr\ArrowFunction $node,
Expand Down
6 changes: 5 additions & 1 deletion src/Reflection/ReflectionMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ class ReflectionMethod
/** @var int-mask-of<ReflectionMethodAdapter::IS_*> */
private int $modifiers;

/** @param non-empty-string|null $aliasName */
/**
* @param non-empty-string|null $aliasName
* @param non-empty-string|null $namespace
*/
private function __construct(
private Reflector $reflector,
MethodNode|Node\Stmt\Function_|Node\Expr\Closure|Node\Expr\ArrowFunction $node,
Expand All @@ -59,6 +62,7 @@ private function __construct(
* @internal
*
* @param non-empty-string|null $aliasName
* @param non-empty-string|null $namespace
*/
public static function createFromNode(
Reflector $reflector,
Expand Down

0 comments on commit 53cd8d4

Please sign in to comment.