Code Duplication    Length = 7-9 lines in 3 locations

src/Service/Game.php 1 location

@@ 64-70 (lines=7) @@
61
        $this->serviceLocator = $locator;
62
    }
63
64
    public function getEventManager() {
65
        if (null === $this->event) {
66
            $this->event = new EventManager($this->serviceLocator->get('SharedEventManager'), [get_class($this)]);
67
        }
68
69
        return $this->event;
70
    }
71
72
    public function getGameUserPath($game, $user)
73
    {

src/Service/PrizeCategory.php 1 location

@@ 45-51 (lines=7) @@
42
        $this->serviceLocator = $locator;
43
    }
44
45
    public function getEventManager() {
46
        if (null === $this->event) {
47
            $this->event = new EventManager($this->serviceLocator->get('SharedEventManager'), [get_class($this)]);
48
        }
49
50
        return $this->event;
51
    }
52
53
    /**
54
     *

src/Form/Admin/Game.php 1 location

@@ 743-751 (lines=9) @@
740
        return $categories;
741
    }
742
743
    public function getEventManager()
744
    {
745
        if ($this->event === NULL) {
746
            $this->event = new EventManager(
747
                $this->getServiceManager()->get('SharedEventManager'), [get_class($this)]
748
            );
749
        }
750
        return $this->event;
751
    }
752
753
    /**
754
     * Retrieve service manager instance