Code Duplication    Length = 14-14 lines in 2 locations

component/Icon.php 2 locations

@@ 164-177 (lines=14) @@
161
     * @return \rmrevin\yii\fontawesome\component\Icon
162
     * @throws \yii\base\InvalidConfigException
163
     */
164
    public function rotate($value)
165
    {
166
        $values = [FontAwesome::ROTATE_90, FontAwesome::ROTATE_180, FontAwesome::ROTATE_270];
167
168
        return $this->addCssClass(
169
            FontAwesome::$basePrefix . '-rotate-' . $value,
170
            in_array((string)$value, $values, true),
171
            sprintf(
172
                '%s - invalid value. Use one of the constants: %s.',
173
                'FontAwesome::rotate()',
174
                implode(', ', $values)
175
            )
176
        );
177
    }
178
179
    /**
180
     * @param string $value
@@ 184-197 (lines=14) @@
181
     * @return \rmrevin\yii\fontawesome\component\Icon
182
     * @throws \yii\base\InvalidConfigException
183
     */
184
    public function flip($value)
185
    {
186
        $values = [FontAwesome::FLIP_HORIZONTAL, FontAwesome::FLIP_VERTICAL];
187
188
        return $this->addCssClass(
189
            FontAwesome::$basePrefix . '-flip-' . $value,
190
            in_array((string)$value, [FontAwesome::FLIP_HORIZONTAL, FontAwesome::FLIP_VERTICAL], true),
191
            sprintf(
192
                '%s - invalid value. Use one of the constants: %s.',
193
                'FontAwesome::flip()',
194
                implode(', ', $values)
195
            )
196
        );
197
    }
198
199
    /**
200
     * @param string $class