Skip to content

Commit 0d421ce

Browse files
Add type declarations
1 parent 6e8854b commit 0d421ce

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

src/StaticAnalysis/CachingFileAnalyser.php

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,11 @@ final class CachingFileAnalyser implements FileAnalyser
1919
{
2020
private const CACHE_FORMAT_VERSION = 2;
2121

22-
/**
23-
* @var FileAnalyser
24-
*/
25-
private $analyser;
22+
private FileAnalyser $analyser;
2623

27-
/**
28-
* @var array
29-
*/
30-
private $cache = [];
24+
private array $cache = [];
3125

32-
/**
33-
* @var string
34-
*/
35-
private $directory;
26+
private string $directory;
3627

3728
public function __construct(string $directory, FileAnalyser $analyser)
3829
{
@@ -131,10 +122,7 @@ private function has(string $filename): bool
131122
return true;
132123
}
133124

134-
/**
135-
* @return mixed
136-
*/
137-
private function read(string $filename)
125+
private function read(string $filename): array
138126
{
139127
return unserialize(
140128
file_get_contents(
@@ -144,10 +132,7 @@ private function read(string $filename)
144132
);
145133
}
146134

147-
/**
148-
* @param mixed $data
149-
*/
150-
private function write(string $filename, $data): void
135+
private function write(string $filename, array $data): void
151136
{
152137
file_put_contents(
153138
$this->cacheFile($filename),

src/StaticAnalysis/ExecutableLinesFindingVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract
5555
/**
5656
* @psalm-var array<int, int>
5757
*/
58-
private $propertyLines = [];
58+
private array $propertyLines = [];
5959

6060
public function enterNode(Node $node): void
6161
{

0 commit comments

Comments
 (0)