Code Duplication    Length = 7-7 lines in 2 locations

src/PlaygroundGame/Controller/Frontend/PostVoteController.php 1 location

@@ 390-396 (lines=7) @@
387
        // Call this for the session lock to be released (other ajax calls can then be made)
388
        session_write_close();
389
390
        if (! $this->game) {
391
            $this->getResponse()->setContent(\Zend\Json\Json::encode(array(
392
                'success' => 0
393
            )));
394
395
            return $this->getResponse();
396
        }
397
398
        $entry = $this->getGameService()->findLastActiveEntry(
399
            $this->game,

src/PlaygroundGame/Controller/Frontend/TradingCardController.php 1 location

@@ 28-34 (lines=7) @@
25
        // Call this for the session lock to be released (other ajax calls can then be made)
26
        session_write_close();
27
28
        if (! $this->game) {
29
            $this->getResponse()->setContent(\Zend\Json\Json::encode(array(
30
                'success' => 0
31
            )));
32
33
            return $this->getResponse();
34
        }
35
36
        $entry = $this->getGameService()->play($this->game, $this->user);
37
        if (!$entry) {