PlatformTrait::setPlatform()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the fusonic/webapp package.
5
 *
6
 * (c) Fusonic GmbH <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Fusonic\WebApp\Members;
13
14
/**
15
 * Adds support for the `platform` member.
16
 *
17
 * <p>
18
 * There is no official list of possible values. However, the Web Platform Working Group maintains a list of known
19
 * platform values {@link https://github.com/w3c/manifest/wiki/Platforms in their wiki}.
20
 *
21
 * @package Fusonic\WebApp
22
 *
23
 * @see https://www.w3.org/TR/appmanifest/#platform-member
24
 */
25
trait PlatformTrait
26
{
27
    private $platform;
28
29
    /**
30
     * Returns the intended target platform for this object.
31
     *
32
     * @return  string|null
33
     */
34 4
    public function getPlatform()
35
    {
36 4
        return $this->platform;
37
    }
38
39
    /**
40
     * Sets the intended target platform for this object.
41
     *
42
     * @param   string              $platform
43
     *
44
     * @return  $this
45
     */
46 1
    public function setPlatform($platform)
47
    {
48 1
        $this->platform = $platform;
49 1
        return $this;
50
    }
51
}
52