Code Duplication    Length = 13-13 lines in 2 locations

php/Arguments/RequestArgument.php 1 location

@@ 41-53 (lines=13) @@
38
        $this->key = $key;
39
    }
40
41
    public function resolve()
42
    {
43
        /** @var Request $request */
44
        $request = $this->requestStack->getCurrentRequest();
45
46
        Assert::isInstanceOf(
47
            $request,
48
            Request::class,
49
            "Cannot resolve request-argument without active request!"
50
        );
51
52
        return $request->get($this->key);
53
    }
54
55
}
56

php/Arguments/RequestPayloadArgument.php 1 location

@@ 33-45 (lines=13) @@
30
        $this->requestStack = $requestStack;
31
    }
32
33
    public function resolve()
34
    {
35
        /** @var Request $request */
36
        $request = $this->requestStack->getCurrentRequest();
37
38
        Assert::isInstanceOf(
39
            $request,
40
            Request::class,
41
            "Cannot resolve request-argument without active request!"
42
        );
43
44
        return $request->getContent(false);
45
    }
46
47
}
48