Code Duplication    Length = 13-13 lines in 2 locations

src/components/OrientationStorage.php 1 location

@@ 68-80 (lines=13) @@
65
     *
66
     * @return array
67
     */
68
    private function ensureStorage()
69
    {
70
        if (!isset($this->storage)) {
71
            $this->storage = $this->getCache()->get($this->cacheKey);
72
73
            if ($this->storage === false) {
74
                $this->storage = $this->getSettingsStorage()->getBounded($this->settingsStorageKey);
75
                $this->cache();
76
            }
77
        }
78
79
        return $this->storage;
80
    }
81
82
    /**
83
     * Saves current [[storage]].

src/components/UiOptionsStorage.php 1 location

@@ 68-80 (lines=13) @@
65
     *
66
     * @return array
67
     */
68
    private function ensureStorage()
69
    {
70
        if (!isset($this->storage)) {
71
            $this->storage = $this->getCache()->get($this->cacheKey);
72
73
            if ($this->storage === false) {
74
                $this->storage = $this->getSettingsStorage()->getBounded($this->settingsStorageKey);
75
                $this->cache();
76
            }
77
        }
78
79
        return $this->storage;
80
    }
81
82
    /**
83
     * Saves current [[storage]].