Passed
Pull Request — 1.x (#334)
by Akihito
02:25
created

ResourceOpenContext   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Resource\SemanticLog;
6
7
use Koriym\SemanticLogger\AbstractContext;
8
9
use function strtoupper;
10
11
/** @deprecated Use BEAR\Resource\SemanticLog\Profile\Compact\OpenContext instead */
12
final class ResourceOpenContext extends AbstractContext
13
{
14
    /** @psalm-suppress InvalidClassConstantType */
15
    public const TYPE = 'bear_resource_request';
16
17
    /** @psalm-suppress InvalidClassConstantType */
18
    public const SCHEMA_URL = 'https://bearsunday.github.io/BEAR.Resource/schemas/bear-resource-request.json';
19
20
    public readonly string $method;
21
22
    /** @param array<string, mixed> $query */
23
    public function __construct(public readonly string $uri, string $method, public readonly array $query = [])
24
    {
25
        $this->method = strtoupper($method);
0 ignored issues
show
Bug introduced by
The property method is declared read-only in BEAR\Resource\SemanticLog\ResourceOpenContext.
Loading history...
26
    }
27
}
28