Code Duplication    Length = 10-10 lines in 2 locations

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
    {

src/components/OrientationStorage.php 1 location

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