OverlayFilesystem::readBuf()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 5
dl 0
loc 9
rs 10
1
<?php
2
3
/**
4
 * This file is part of the sj-i/php-fuse package.
5
 *
6
 * (c) sji <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Fuse\Filesystem\Overlay;
15
16
use Fuse\Filesystem\ReflectionFilesystem;
17
use Fuse\FilesystemFlagsImplementationTrait;
18
use Fuse\FilesystemInterface;
19
use Fuse\Libc\Fcntl\Flock;
20
use Fuse\Libc\Fuse\FuseBufVec;
21
use Fuse\Libc\Fuse\FuseConnInfo;
22
use Fuse\Libc\Fuse\FuseDirFill;
23
use Fuse\Libc\Fuse\FuseDirHandle;
24
use Fuse\Libc\Fuse\FuseFileInfo;
25
use Fuse\Libc\Fuse\FuseFillDir;
26
use Fuse\Libc\Fuse\FuseIoctlArgPointer;
27
use Fuse\Libc\Fuse\FuseIoctlDataPointer;
28
use Fuse\Libc\Fuse\FusePollHandle;
29
use Fuse\Libc\Fuse\FusePrivateData;
30
use Fuse\Libc\Fuse\FuseReadDirBuffer;
31
use Fuse\Libc\String\CBytesBuffer;
32
use Fuse\Libc\String\CStringBuffer;
33
use Fuse\Libc\Sys\Stat\Stat;
34
use Fuse\Libc\Sys\StatVfs\StatVfs;
35
use Fuse\Libc\Time\TimeSpec;
36
use Fuse\Libc\Utime\UtimBuf;
37
use Fuse\MountableFilesystemTrait;
38
use TypedCData\TypedCDataArray;
0 ignored issues
show
Bug introduced by
The type TypedCData\TypedCDataArray was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
39
40
final class OverlayFilesystem implements FilesystemInterface
41
{
42
    use MountableFilesystemTrait;
43
    use FilesystemFlagsImplementationTrait;
44
45
    private FilesystemInterface $main;
46
    private FilesystemInterface $fallback;
47
48
    public function __construct(
49
        FilesystemInterface $main,
50
        FilesystemInterface $fallback
51
    ) {
52
        $this->main = $main;
53
        $this->fallback = $fallback;
54
    }
55
56
    /** @return int|FusePrivateData|null|void */
57
    private function fallbackIfDefault(string $method_name, array $args)
58
    {
59
        if (ReflectionFilesystem::instance($this->main)->isDefault($method_name)) {
60
            /** @var int|FusePrivateData|null|void */
61
            return $this->fallback->$method_name(...$args);
62
        }
63
        /** @var int|FusePrivateData|null|void */
64
        return $this->main->$method_name(...$args);
65
    }
66
67
    /**
68
     * int (*getattr) (const char *, struct stat *);
69
     */
70
    public function getattr(string $path, Stat $stat): int
71
    {
72
        /** @var int */
73
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
74
    }
75
76
    /**
77
     * int (*readlink) (const char *, char *, size_t);
78
     */
79
    public function readlink(string $path, CStringBuffer $buffer, int $size): int
80
    {
81
        /** @var int */
82
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
83
    }
84
85
    /**
86
     * int (*getdir) (const char *, fuse_dirh_t, fuse_dirfil_t);
87
     *
88
     * @deprecated
89
     */
90
    public function getdir(string $path, FuseDirHandle $dirhandle, FuseDirFill $dirfill): int
91
    {
92
        /** @var int */
93
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
94
    }
95
96
    /**
97
     * int (*mknod) (const char *, mode_t, dev_t);
98
     */
99
    public function mknod(string $path, int $mode, int $dev): int
100
    {
101
        /** @var int */
102
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
103
    }
104
105
    /**
106
     * int (*mkdir) (const char *, mode_t);
107
     */
108
    public function mkdir(string $path, int $mode): int
109
    {
110
        /** @var int */
111
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
112
    }
113
114
    /**
115
     * int (*unlink) (const char *);
116
     */
117
    public function unlink(string $path): int
118
    {
119
        /** @var int */
120
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
121
    }
122
123
    /**
124
     * int (*rmdir) (const char *);
125
     */
126
    public function rmdir(string $path): int
127
    {
128
        /** @var int */
129
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
130
    }
131
132
    /**
133
     * int (*symlink) (const char *, const char *);
134
     */
135
    public function symlink(string $path, string $link): int
136
    {
137
        /** @var int */
138
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
139
    }
140
141
    /**
142
     * int (*rename) (const char *, const char *);
143
     */
144
    public function rename(string $from, string $to): int
145
    {
146
        /** @var int */
147
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
148
    }
149
150
    /**
151
     * int (*link) (const char *, const char *);
152
     */
153
    public function link(string $path, string $link): int
154
    {
155
        /** @var int */
156
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
157
    }
158
159
    /**
160
     * int (*chmod) (const char *, mode_t);
161
     */
162
    public function chmod(string $path, int $mode): int
163
    {
164
        /** @var int */
165
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
166
    }
167
168
    /**
169
     * int (*chown) (const char *, uid_t, gid_t);
170
     */
171
    public function chown(string $path, int $uid, int $gid): int
172
    {
173
        /** @var int */
174
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
175
    }
176
177
    /**
178
     * int (*truncate) (const char *, off_t);
179
     */
180
    public function truncate(string $path, int $offset): int
181
    {
182
        /** @var int */
183
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
184
    }
185
186
    /**
187
     * int (*utime) (const char *, struct utimbuf *);
188
     */
189
    public function utime(string $path, UtimBuf $utime_buf): int
190
    {
191
        /** @var int */
192
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
193
    }
194
195
    /**
196
     * int (*open) (const char *, struct fuse_file_info *);
197
     */
198
    public function open(string $path, FuseFileInfo $fuse_file_info): int
199
    {
200
        /** @var int */
201
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
202
    }
203
204
    /**
205
     * int (*read) (const char *, char *, size_t, off_t, struct fuse_file_info *);
206
     */
207
    public function read(string $path, CBytesBuffer $buffer, int $size, int $offset, FuseFileInfo $fuse_file_info): int
208
    {
209
        /** @var int */
210
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
211
    }
212
213
    /**
214
     * int (*write) (const char *, const char *, size_t, off_t, struct fuse_file_info *);
215
     */
216
    public function write(string $path, string $buffer, int $size, int $offset, FuseFileInfo $fuse_file_info): int
217
    {
218
        /** @var int */
219
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
220
    }
221
222
    /**
223
     * int (*statfs) (const char *, struct statvfs *);
224
     */
225
    public function statfs(string $path, StatVfs $statvfs): int
226
    {
227
        /** @var int */
228
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
229
    }
230
231
    /**
232
     * int (*flush) (const char *, struct fuse_file_info *);
233
     */
234
    public function flush(string $path, FuseFileInfo $fuse_file_info): int
235
    {
236
        /** @var int */
237
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
238
    }
239
240
    /**
241
     * int (*release) (const char *, struct fuse_file_info *);
242
     */
243
    public function release(string $path, FuseFileInfo $fuse_file_info): int
244
    {
245
        /** @var int */
246
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
247
    }
248
249
    /**
250
     * int (*fsync) (const char *, int, struct fuse_file_info *);
251
     */
252
    public function fsync(string $path, int $flags, FuseFileInfo $fuse_file_info): int
253
    {
254
        /** @var int */
255
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
256
    }
257
258
    /**
259
     * int (*setxattr) (const char *, const char *, const char *, size_t, int);
260
     */
261
    public function setxattr(string $path, string $name, string $value, int $size): int
262
    {
263
        /** @var int */
264
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
265
    }
266
267
    /**
268
     * int (*getxattr) (const char *, const char *, char *, size_t);
269
     */
270
    public function getxattr(string $path, string $name, ?string &$value, int $size): int
271
    {
272
        /** @var int */
273
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
274
    }
275
276
    /**
277
     * int (*listxattr) (const char *, char *, size_t);*
278
     */
279
    public function listxattr(string $path, ?string &$value, int $size): int
280
    {
281
        /** @var int */
282
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
283
    }
284
285
    /**
286
     * int (*removexattr) (const char *, const char *);
287
     */
288
    public function removexattr(string $path, string $name): int
289
    {
290
        /** @var int */
291
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
292
    }
293
294
    /**
295
     * int (*opendir) (const char *, struct fuse_file_info *);
296
     */
297
    public function opendir(string $path, FuseFileInfo $fuse_file_info): int
298
    {
299
        /** @var int */
300
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
301
    }
302
303
    /**
304
     * int (*readdir) (const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *);
305
     */
306
    public function readdir(
307
        string $path,
308
        FuseReadDirBuffer $buf,
309
        FuseFillDir $filler,
310
        int $offset,
311
        FuseFileInfo $fuse_file_info
312
    ): int {
313
        /** @var int */
314
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
315
    }
316
317
    /**
318
     * int (*releasedir) (const char *, struct fuse_file_info *);
319
     */
320
    public function releasedir(string $path, FuseFileInfo $fuse_file_info): int
321
    {
322
        /** @var int */
323
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
324
    }
325
326
    /**
327
     * int (*fsyncdir) (const char *, int, struct fuse_file_info *);
328
     */
329
    public function fsyncdir(string $path, FuseFileInfo $fuse_file_info): int
330
    {
331
        /** @var int */
332
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
333
    }
334
335
    /**
336
     * void *(*init) (struct fuse_conn_info *conn);
337
     */
338
    public function init(FuseConnInfo $conn): ?FusePrivateData
339
    {
340
        /** @var null|FusePrivateData */
341
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type integer which is incompatible with the type-hinted return Fuse\Libc\Fuse\FusePrivateData|null. Consider adding an additional type-check to rule them out.
Loading history...
342
    }
343
344
    /**
345
     * void (*destroy) (void *);
346
     */
347
    public function destroy(?FusePrivateData $private_data): void
348
    {
349
        $this->fallbackIfDefault(__FUNCTION__, func_get_args());
350
    }
351
352
    /**
353
     * int (*access) (const char *, int);
354
     */
355
    public function access(string $path, int $mode): int
356
    {
357
        /** @var int */
358
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
359
    }
360
361
    /**
362
     * int (*create) (const char *, mode_t, struct fuse_file_info *);
363
     */
364
    public function create(string $path, int $mode, FuseFileInfo $fuse_file_info): int
365
    {
366
        /** @var int */
367
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
368
    }
369
370
    /**
371
     * int (*ftruncate) (const char *, off_t, struct fuse_file_info *);
372
     */
373
    public function ftruncate(string $path, int $offset, FuseFileInfo $fuse_file_info): int
374
    {
375
        /** @var int */
376
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
377
    }
378
379
    /**
380
     * int (*fgetattr) (const char *, struct stat *, struct fuse_file_info *);
381
     */
382
    public function fgetattr(string $path, Stat $stat, FuseFileInfo $fuse_file_info): int
383
    {
384
        /** @var int */
385
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
386
    }
387
388
    /**
389
     * int (*lock) (const char *, struct fuse_file_info *, int cmd, struct flock *);
390
     */
391
    public function lock(string $path, FuseFileInfo $fuse_file_info, int $cmd, Flock $flock): int
392
    {
393
        /** @var int */
394
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
395
    }
396
397
    /**
398
     * int (*utimens) (const char *, const struct timespec tv[2]);
399
     *
400
     * @param TypedCDataArray<TimeSpec> $tv
401
     */
402
    public function utimens(string $path, TypedCDataArray $tv): int
403
    {
404
        /** @var int */
405
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
406
    }
407
408
    /**
409
     * int (*bmap) (const char *, size_t blocksize, uint64_t *idx);
410
     */
411
    public function bmap(string $path, int $blocksize, int &$idx): int
412
    {
413
        /** @var int */
414
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
415
    }
416
417
    /**
418
     * int (*ioctl) (const char *, int cmd, void *arg, struct fuse_file_info *, unsigned int flags, void *data);
419
     */
420
    public function ioctl(
421
        string $path,
422
        int $cmd,
423
        FuseIoctlArgPointer $arg,
424
        FuseFileInfo $fuse_file_info,
425
        int $flags,
426
        FuseIoctlDataPointer $data
427
    ): int {
428
        /** @var int */
429
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
430
    }
431
432
    /**
433
     * int (*poll) (const char *, struct fuse_file_info *, struct fuse_pollhandle *ph, unsigned *reventsp);
434
     */
435
    public function poll(
436
        string $path,
437
        FuseFileInfo $fuse_file_info,
438
        FusePollHandle $fuse_pollhandle,
439
        int &$reventsp
440
    ): int {
441
        /** @var int */
442
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
443
    }
444
445
    /**
446
     * int (*write_buf) (const char *, struct fuse_bufvec *buf, off_t off, struct fuse_file_info *);
447
     */
448
    public function writeBuf(string $path, FuseBufVec $buf, int $offset, FuseFileInfo $fuse_file_info): int
449
    {
450
        /** @var int */
451
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
452
    }
453
454
    /**
455
     * int (*read_buf) (const char *, struct fuse_bufvec **bufp, size_t size, off_t off, struct fuse_file_info *);
456
     *
457
     * @param TypedCDataArray<FuseBufVec> $bufp
458
     */
459
    public function readBuf(
460
        string $path,
461
        TypedCDataArray $bufp,
462
        int $size,
463
        int $offset,
464
        FuseFileInfo $fuse_file_info
465
    ): int {
466
        /** @var int */
467
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
468
    }
469
470
    /**
471
     * int (*flock) (const char *, struct fuse_file_info *, int op);
472
     */
473
    public function flock(string $path, FuseFileInfo $fuse_file_info, int $op): int
474
    {
475
        /** @var int */
476
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
477
    }
478
479
    /**
480
     * int (*fallocate) (const char *, int, off_t, off_t, struct fuse_file_info *);
481
     */
482
    public function fallocate(string $path, int $mode, int $offset, FuseFileInfo $fuse_file_info): int
483
    {
484
        /** @var int */
485
        return $this->fallbackIfDefault(__FUNCTION__, func_get_args());
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->fallbackIf...ION__, func_get_args()) could return the type Fuse\Libc\Fuse\FusePrivateData|null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
486
    }
487
}
488