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

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