log_unimplemented.php$0 ➔ log()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
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 3
dl 0
loc 3
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
include __DIR__ . "/../vendor/autoload.php";
15
include __DIR__ . "/DummyFs.php";
16
17
use Fuse\Filesystem\Log\LogUnimplementedFilesystem;
18
use Fuse\Mounter;
19
use Psr\Log\LoggerInterface;
0 ignored issues
show
Bug introduced by
The type Psr\Log\LoggerInterface 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...
20
use Psr\Log\LoggerTrait;
0 ignored issues
show
Bug introduced by
The type Psr\Log\LoggerTrait 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...
21
22
$mounter = new Mounter();
23
24
return $mounter->mount(
25
    '/tmp/example/',
26
    new LogUnimplementedFilesystem(
27
        new DummyFs(),
28
        new class() implements LoggerInterface {
29
            use LoggerTrait;
30
31
            public function log($level, $message, array $context = [])
32
            {
33
                echo \json_encode(['message' => $message] + $context), PHP_EOL;
34
            }
35
        }
36
    )
37
);
38