1 | <?php |
||
17 | class StreamHandler |
||
18 | { |
||
19 | private $globs = []; |
||
20 | |||
21 | private $toPush = []; |
||
22 | |||
23 | private $temp = []; |
||
24 | |||
25 | /** |
||
26 | * Provides streams by the pattern passed |
||
27 | * |
||
28 | * @param string|array $accept |
||
29 | * |
||
30 | * @return self |
||
31 | */ |
||
32 | public function src($accept) : self |
||
52 | |||
53 | /** |
||
54 | * Handle each stream |
||
55 | * |
||
56 | * @param callable|PluginInterface $callback |
||
57 | * |
||
58 | * @return self |
||
59 | */ |
||
60 | public function forStream($callback) : self |
||
82 | |||
83 | /** |
||
84 | * Handle all streams |
||
85 | * |
||
86 | * @param callable|PluginInterface $callback |
||
87 | * |
||
88 | * @return self |
||
89 | */ |
||
90 | public function forStreams($callback) : self |
||
108 | |||
109 | private function getCallback($cb) : callable |
||
121 | |||
122 | /** |
||
123 | * Pushes a stream to be used on destination |
||
124 | * |
||
125 | * @param StreamInterface $stream |
||
126 | */ |
||
127 | public function push(StreamInterface $stream) |
||
131 | |||
132 | /** |
||
133 | * Creates a temporary stream |
||
134 | * It will be deleted in the end of task execution |
||
135 | * |
||
136 | * @param StreamInterface $stream |
||
137 | */ |
||
138 | public function temp(StreamInterface $stream) |
||
143 | |||
144 | /** |
||
145 | * Sends pushed streams to a directory (plugin) |
||
146 | * |
||
147 | * @param string $dest |
||
148 | * |
||
149 | * @return callable |
||
150 | */ |
||
151 | public function toDir(string $dest) : ToDirPlugin |
||
155 | |||
156 | /** |
||
157 | * Cleans up pushed streams and delete indicated temporary files |
||
158 | * |
||
159 | * @return self |
||
160 | */ |
||
161 | public function end() : self |
||
174 | |||
175 | private function recoursiveGlob($pattern, $flags = 0) : array |
||
200 | } |
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..