Code Duplication    Length = 7-7 lines in 2 locations

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) {

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

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