Code Duplication    Length = 10-10 lines in 2 locations

src/components/OrientationStorage.php 1 location

@@ 129-138 (lines=10) @@
126
    /**
127
     * @return string
128
     */
129
    public function getDefaultOrientation()
130
    {
131
        $settings = Yii::$app->themeManager->getSettings();
132
133
        if (property_exists($settings, 'filterOrientation') && in_array($settings->filterOrientation, [self::ORIENTATION_HORIZONTAL, self::ORIENTATION_VERTICAL], true)) {
134
            return $settings->filterOrientation;
135
        } else {
136
            return self::ORIENTATION_HORIZONTAL;
137
        }
138
    }
139
}
140

src/components/UiOptionsStorage.php 1 location

@@ 129-138 (lines=10) @@
126
    /**
127
     * @return string
128
     */
129
    public function getDefaultOption()
130
    {
131
        $settings = Yii::$app->themeManager->getSettings();
132
133
        if (property_exists($settings, 'filterOrientation') && in_array($settings->filterOrientation, [self::ORIENTATION_HORIZONTAL, self::ORIENTATION_VERTICAL], true)) {
134
            return $settings->filterOrientation;
135
        } else {
136
            return self::ORIENTATION_HORIZONTAL;
137
        }
138
    }
139
140
    public function getOption($option)
141
    {