Completed
Push — master ( 0403bf...cf24ba )
by WEBEWEB
01:19
created

FloatYTrait   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 37
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getY() 0 3 1
A getYInt() 0 3 1
A setY() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the core-library package.
5
 *
6
 * (c) 2020 WEBEWEB
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 WBW\Library\Core\Model\Attribute;
13
14
/**
15
 * Float y trait.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Library\Core\Model\Attribute
19
 */
20
trait FloatYTrait {
21
22
    /**
23
     * Y.
24
     *
25
     * @var float
26
     */
27
    protected $y;
28
29
    /**
30
     * Get the y.
31
     *
32
     * @return float Returns the y.
33
     */
34
    public function getY() {
35
        return $this->y;
36
    }
37
38
    /**
39
     * Get the (int) y.
40
     *
41
     * @return int Returns the y.
42
     */
43
    public function getYInt() {
44
        return intval($this->y);
45
    }
46
47
    /**
48
     * Set the y.
49
     *
50
     * @param float $y The y.
51
     */
52
    public function setY($y) {
53
        $this->y = $y;
54
        return $this;
55
    }
56
}
57