Completed
Pull Request — master (#7)
by Fabian
02:20
created

PlatformTrait::setPlatform()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
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
 * @package Fusonic\WebApp
18
 *
19
 * @see PlatformInterface
20
 * @see https://www.w3.org/TR/appmanifest/#platform-member
21
 */
22
trait PlatformTrait
23
{
24
    private $platform;
25
26
    /**
27
     * Returns the intended target platform for this object.
28
     *
29
     * @return  string|null
30
     */
31
    public function getPlatform()
32
    {
33
        return $this->platform;
34
    }
35
36
    /**
37
     * Sets the intended target platform for this object.
38
     *
39
     * @param   string              $platform
40
     *
41
     * @return  $this
42
     */
43
    public function setPlatform($platform)
44
    {
45
        $this->platform = $platform;
46
        return $this;
47
    }
48
}
49