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

PlatformTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 27
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPlatform() 0 4 1
A setPlatform() 0 5 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
 * @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