Code Duplication    Length = 16-17 lines in 2 locations

src/AppConfiguration.php 2 locations

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