Code Duplication    Length = 16-17 lines in 2 locations

src/AppConfiguration.php 2 locations

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