FuseFFI   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 4
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 4
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A fuse_main_real() 0 2 1
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;
15
16
use FFI;
17
use FFI\CData;
18
19
class FuseFFI extends FFI
20
{
21
    public function fuse_main_real(int $argc, CData $argv, CData $fuse_operation, int $size, ?CData $user_data): int
0 ignored issues
show
Unused Code introduced by
The parameter $argv is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

21
    public function fuse_main_real(int $argc, /** @scrutinizer ignore-unused */ CData $argv, CData $fuse_operation, int $size, ?CData $user_data): int

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $size is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

21
    public function fuse_main_real(int $argc, CData $argv, CData $fuse_operation, /** @scrutinizer ignore-unused */ int $size, ?CData $user_data): int

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $fuse_operation is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

21
    public function fuse_main_real(int $argc, CData $argv, /** @scrutinizer ignore-unused */ CData $fuse_operation, int $size, ?CData $user_data): int

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $user_data is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

21
    public function fuse_main_real(int $argc, CData $argv, CData $fuse_operation, int $size, /** @scrutinizer ignore-unused */ ?CData $user_data): int

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $argc is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

21
    public function fuse_main_real(/** @scrutinizer ignore-unused */ int $argc, CData $argv, CData $fuse_operation, int $size, ?CData $user_data): int

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
22
    {
23
24
    }
0 ignored issues
show
Bug Best Practice introduced by
In this branch, the function will implicitly return null which is incompatible with the type-hinted return integer. Consider adding a return statement or allowing null as return value.

For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example:

interface ReturnsInt {
    public function returnsIntHinted(): int;
}

class MyClass implements ReturnsInt {
    public function returnsIntHinted(): int
    {
        if (foo()) {
            return 123;
        }
        // here: null is implicitly returned
    }
}
Loading history...
25
}