Code Duplication    Length = 7-7 lines in 2 locations

src/Controller/Frontend/TradingCardController.php 1 location

@@ 35-41 (lines=7) @@
32
        // Call this for the session lock to be released (other ajax calls can then be made)
33
        session_write_close();
34
35
        if (! $this->game) {
36
            $this->getResponse()->setContent(\Zend\Json\Json::encode(array(
37
                'success' => 0
38
            )));
39
40
            return $this->getResponse();
41
        }
42
43
        $entry = $this->getGameService()->play($this->game, $this->user);
44
        if (!$entry) {

src/Controller/Frontend/PostVoteController.php 1 location

@@ 403-409 (lines=7) @@
400
        // Call this for the session lock to be released (other ajax calls can then be made)
401
        session_write_close();
402
403
        if (! $this->game) {
404
            $this->getResponse()->setContent(\Zend\Json\Json::encode(array(
405
                'success' => 0
406
            )));
407
408
            return $this->getResponse();
409
        }
410
411
        $entry = $this->getGameService()->findLastActiveEntry(
412
            $this->game,