Skip to content

Commit f17691d

Browse files
Improve type annotations
1 parent 107ea3b commit f17691d

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

src/Framework/Attributes/CoversClass.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@
1515
final class CoversClass
1616
{
1717
/**
18-
* @var string
18+
* @psalm-var class-string
1919
*/
2020
private $className;
2121

22+
/**
23+
* @psalm-param class-string $className
24+
*/
2225
public function __construct(string $className)
2326
{
2427
$this->className = $className;
2528
}
2629

30+
/**
31+
* @psalm-return class-string
32+
*/
2733
public function className(): string
2834
{
2935
return $this->className;

src/Framework/Attributes/DataProviderExternal.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
final class DataProviderExternal
1616
{
1717
/**
18-
* @var string
18+
* @psalm-var class-string
1919
*/
2020
private $className;
2121

@@ -24,12 +24,18 @@ final class DataProviderExternal
2424
*/
2525
private $methodName;
2626

27+
/**
28+
* @psalm-param class-string $className
29+
*/
2730
public function __construct(string $className, string $methodName)
2831
{
2932
$this->className = $className;
3033
$this->methodName = $methodName;
3134
}
3235

36+
/**
37+
* @psalm-return class-string
38+
*/
3339
public function className(): string
3440
{
3541
return $this->className;

src/Framework/Attributes/DependsExternal.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
final class DependsExternal
1616
{
1717
/**
18-
* @var string
18+
* @psalm-var class-string
1919
*/
2020
private $className;
2121

@@ -24,12 +24,18 @@ final class DependsExternal
2424
*/
2525
private $methodName;
2626

27+
/**
28+
* @psalm-param class-string $className
29+
*/
2730
public function __construct(string $className, string $methodName)
2831
{
2932
$this->className = $className;
3033
$this->methodName = $methodName;
3134
}
3235

36+
/**
37+
* @psalm-return class-string
38+
*/
3339
public function className(): string
3440
{
3541
return $this->className;

0 commit comments

Comments
 (0)