1 | <?php |
||
8 | class BaseFileStream |
||
9 | { |
||
10 | /** |
||
11 | * Base file name. |
||
12 | * |
||
13 | * Example: |
||
14 | * /var/www/export.yml |
||
15 | * /var/www/sitemap{count}.xml |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $fileName; |
||
20 | |||
21 | /** |
||
22 | * @param string $fileName file name |
||
23 | */ |
||
24 | 9 | public function __construct($fileName) |
|
28 | |||
29 | private $_handle = false; |
||
30 | |||
31 | /** |
||
32 | * Get file handle. |
||
33 | * @return bool|resource |
||
34 | * @throws \Exception |
||
35 | */ |
||
36 | 6 | public function getHandle() |
|
44 | |||
45 | /** |
||
46 | * Open new file handle. |
||
47 | * @throws \Exception |
||
48 | */ |
||
49 | 6 | protected function openHandle() |
|
59 | |||
60 | /** |
||
61 | * Binary-safe file handle write. |
||
62 | * @param string $string contents |
||
63 | * @throws \Exception |
||
64 | */ |
||
65 | 6 | public function write($string) |
|
74 | |||
75 | /** |
||
76 | * Close file handle. |
||
77 | * @throws \Exception |
||
78 | */ |
||
79 | 6 | protected function closeHandle() |
|
87 | |||
88 | /** |
||
89 | * @var \CommandInterface[] |
||
90 | */ |
||
91 | protected $commands = []; |
||
92 | 6 | protected function runCommand($filename) |
|
98 | |||
99 | 3 | public function addCommand(CommandInterface $command) |
|
103 | |||
104 | /** |
||
105 | * Base file name with replaced count placeholder. |
||
106 | * @return string Base file name with replaced placeholder |
||
107 | */ |
||
108 | 6 | protected function getFileName() |
|
114 | |||
115 | /** |
||
116 | * Destruct. |
||
117 | */ |
||
118 | 6 | public function __destruct() |
|
122 | } |
||
123 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..