Conditions | 2 |
Paths | 4 |
Total Lines | 39 |
Code Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
26 | #[Override] |
||
27 | public function invoke(AbstractRequest $request): ResourceObject |
||
28 | { |
||
29 | // Use URI and method for better user understanding |
||
30 | $uri = $request->toUri(); |
||
31 | $method = strtoupper($request->method); |
||
32 | |||
33 | $query = $request->query; |
||
|
|||
34 | |||
35 | $context = new ResourceOpenContext( |
||
36 | $uri, |
||
37 | $method, |
||
38 | $query, |
||
39 | ); |
||
40 | |||
41 | $openId = $this->semanticLogger->open($context); |
||
42 | |||
43 | try { |
||
44 | $result = $this->invoker->invoke($request); |
||
45 | |||
46 | $closeContext = new ResourceCompleteContext( |
||
47 | $result, |
||
48 | $method, |
||
49 | ); |
||
50 | |||
51 | $this->semanticLogger->close($closeContext, $openId); |
||
52 | |||
53 | return $result; |
||
54 | } catch (Throwable $e) { |
||
55 | $errorContext = new ResourceErrorContext( |
||
56 | $uri, |
||
57 | $method, |
||
58 | $e::class, |
||
59 | $e->getMessage(), |
||
60 | ); |
||
61 | |||
62 | $this->semanticLogger->close($errorContext, $openId); |
||
63 | |||
64 | throw $e; |
||
65 | } |
||
68 |
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..