Skip to content

Commit ddcc729

Browse files
committed
Add PHP type
1 parent 840590d commit ddcc729

File tree

1 file changed

+17
-66
lines changed

1 file changed

+17
-66
lines changed

src/Csv.php

Lines changed: 17 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -25,86 +25,37 @@ class Csv
2525
*
2626
* @psalm-var resource|closed-resource|false|null
2727
*/
28-
protected $handle;
28+
protected mixed $handle = null;
2929

30-
/**
31-
* @var string
32-
*/
33-
protected $pathDir;
34-
35-
/**
36-
* @var string
37-
*/
38-
protected $filename;
39-
40-
/**
41-
* @var string
42-
*/
43-
protected $currentPathname;
44-
45-
/**
46-
* @var array|null
47-
*/
48-
protected $header;
30+
protected string $pathDir;
31+
protected string $filename;
32+
protected string $currentPathname;
4933

5034
/**
51-
* @var int|null
35+
* @var array<string, string>|null
5236
*/
53-
protected $maxLines;
37+
protected ?array $header;
5438

55-
/**
56-
* @var string
57-
*/
58-
protected $delimiter;
39+
protected ?int $maxLines;
40+
protected string $delimiter;
41+
protected string $enclosure;
42+
protected string $eol;
43+
protected string $escape;
44+
protected int $fileNumber = 0;
45+
protected int $lines = 0;
46+
protected int $totalLines = 0;
5947

6048
/**
61-
* @var string
62-
*/
63-
protected $enclosure;
64-
65-
/**
66-
* @var string
67-
*/
68-
protected $eol;
69-
70-
/**
71-
* @var string
72-
*/
73-
protected $escape;
74-
75-
/**
76-
* @var int
77-
*/
78-
protected $fileNumber = 0;
79-
80-
/**
81-
* @var int
82-
*/
83-
protected $lines = 0;
84-
85-
/**
86-
* @var int
87-
*/
88-
protected $totalLines = 0;
89-
90-
/**
91-
* @var bool
92-
*
9349
* @deprecated No longer used
9450
*/
95-
protected $unixToDos = false;
51+
protected bool $unixToDos = false;
9652

9753
/**
98-
* @var string
99-
*
10054
* @deprecated No longer used
10155
*/
102-
protected $unixToDosPath;
56+
protected string $unixToDosPath;
10357

104-
/**
105-
* @var bool
106-
*/
107-
protected $addUtf8Bom = false;
58+
protected bool $addUtf8Bom = false;
10859

10960
/**
11061
* Constructor.

0 commit comments

Comments
 (0)