Code Duplication    Length = 12-12 lines in 2 locations

src/Resolver/Pipeline/Stages/MethodCallStage.php 1 location

@@ 20-31 (lines=12) @@
17
     * @return void
18
     * @throws \Exception
19
     */
20
    public function processCommand()
21
    {
22
        if (!$this->hasInstanceAction()) {
23
            throw new InvalidCommandException(
24
                "No valid instance for callback in dispatcher command " .
25
                "[" . print_r($this->getCommand(), true) . "]"
26
            );
27
        }
28
29
        $return = $this->callMethod();
30
        $this->getCommand()->setReturn($return);
31
    }
32
33
    /**
34
     * @return ResponseInterface

src/Resolver/Pipeline/Stages/ActionCallStage.php 1 location

@@ 21-32 (lines=12) @@
18
     * @return void
19
     * @throws \Exception
20
     */
21
    public function processCommand()
22
    {
23
        if (!$this->hasInstanceAction()) {
24
            throw new InvalidCommandException(
25
                "No valid instance for callback in dispatcher command " .
26
                "[" . print_r($this->getCommand(), true) . "]"
27
            );
28
        }
29
30
        $return = $this->invokeAction();
31
        $this->getCommand()->setReturn($return);
32
    }
33
34
    /**
35
     * @return ResponseInterface