Code Duplication    Length = 7-8 lines in 3 locations

src/PlaygroundCore/Controller/Admin/WebsiteAdminController.php 1 location

@@ 68-75 (lines=8) @@
65
        return $this;
66
    }
67
68
    public function getLocaleService()
69
    {
70
        if (null === $this->localeService) {
71
            $this->localeService = $this->getServiceLocator()->get('playgroundcore_locale_service');
72
        }
73
74
        return $this->localeService;
75
    }
76
77
    public function setLocaleService($localeService)
78
    {

src/PlaygroundCore/View/Helper/SwitchLocaleWidget.php 1 location

@@ 58-64 (lines=7) @@
55
    *
56
    * @return Service/Locale $localeService
57
    */
58
    public function getLocaleService()
59
    {
60
        if ($this->localeService === null) {
61
            $this->localeService = $this->getServiceLocator()->get('playgroundcore_locale_service');
62
        }
63
        return $this->localeService;
64
    }
65
66
    /**
67
    * setLocaleService : set le service locale

src/PlaygroundCore/Controller/Frontend/SwitchLocaleController.php 1 location

@@ 66-72 (lines=7) @@
63
    *
64
    * @return Service/Locale $localeService
65
    */
66
    public function getLocaleService()
67
    {
68
        if ($this->localeService === null) {
69
            $this->localeService = $this->getServiceLocator()->get('playgroundcore_locale_service');
70
        }
71
        return $this->localeService;
72
    }
73
}
74