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

@@ 763-771 (lines=9) @@
760
        return $categories;
761
    }
762
763
    public function getEventManager()
764
    {
765
        if ($this->event === NULL) {
766
            $this->event = new EventManager(
767
                $this->getServiceManager()->get('SharedEventManager'), [get_class($this)]
768
            );
769
        }
770
        return $this->event;
771
    }
772
773
    /**
774
     * Retrieve service manager instance