Code Duplication    Length = 16-17 lines in 2 locations

src/AppConfiguration.php 2 locations

@@ 167-182 (lines=16) @@
164
     *
165
     * @see https://www.w3.org/TR/appmanifest/#dir-member
166
     */
167
    public function setDirection($direction)
168
    {
169
        if (!in_array(
170
            $direction,
171
            [
172
                self::DIRECTION_LEFT_TO_RIGHT,
173
                self::DIRECTION_RIGHT_TO_LEFT,
174
                self::DIRECTION_AUTO
175
            ]
176
        )) {
177
            throw new \InvalidArgumentException("Use one of AppConfiguration::DIRECTION_* constants.");
178
        }
179
180
        $this->direction = $direction;
181
        return $this;
182
    }
183
184
    /**
185
     * Returns the preferred display mode.
@@ 203-219 (lines=17) @@
200
     *
201
     * @see https://www.w3.org/TR/appmanifest/#display-member
202
     */
203
    public function setDisplay($display)
204
    {
205
        if (!in_array(
206
            $display,
207
            [
208
                self::DISPLAY_FULLSCREEN,
209
                self::DISPLAY_MINIMAL_UI,
210
                self::DISPLAY_STANDALONE,
211
                self::DISPLAY_BROWSER
212
            ]
213
        )) {
214
            throw new \InvalidArgumentException("Use one of AppConfiguration::DISPLAY_* constants.");
215
        }
216
217
        $this->display = $display;
218
        return $this;
219
    }
220
221
    /**
222
     * Returns an array of all application icons.