SphereMethods   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 86
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 4
Bugs 2 Features 0
Metric Value
wmc 7
c 4
b 2
f 0
lcom 0
cbo 0
dl 0
loc 86
ccs 21
cts 21
cp 1
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A radius() 0 4 1
A segmentsHeight() 0 4 1
A segmentsWidth() 0 4 1
A phiStart() 0 4 1
A phiLength() 0 4 1
A thetaStart() 0 4 1
A thetaLength() 0 4 1
1
<?php
2
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jun 27, 2016 - 4:04:42 AM
5
 * Contact      [email protected]
6
 * @copyright   2016 Marko Kungla - https://github.com/mkungla
7
 * @license     The MIT License (MIT)
8
 * 
9
 * @category       AframeVR
10
 * @package        aframe-php
11
 * 
12
 * Lang         PHP (php version >= 7)
13
 * Encoding     UTF-8
14
 * File         SphereMethods.php
15
 * Code format  PSR-2 and 12
16
 * @link        https://github.com/mkungla/aframe-php
17
 * @issues      https://github.com/mkungla/aframe-php/issues
18
 * ********************************************************************
19
 * Contributors:
20
 * @author Marko Kungla <[email protected]>
21
 * ********************************************************************
22
 * Comments:
23
 * @formatter:on */
24
namespace AframeVR\Core\Components\Geometry\Methods;
25
26
class SphereMethods
27
{
28
    /**
29
     * Radius of the sphere.
30
     *
31
     * @param array $dom_attributes            
32
     * @param double $radius            
33
     * @return void
34
     */
35 7
    public function radius(array &$dom_attributes, float $radius)
36
    {
37 7
        $dom_attributes['radius'] = $radius;
38 7
    }
39
40
    /**
41
     * Number of vertical segments.
42
     *
43
     * @param array $dom_attributes            
44
     * @param int $segmentsHeight            
45
     * @return void
46
     */
47 7
    public function segmentsHeight(array &$dom_attributes, int $segmentsHeight)
48
    {
49 7
        $dom_attributes['segmentsHeight'] = $segmentsHeight;
50 7
    }
51
52
    /**
53
     * Number of horizontal segments.
54
     *
55
     * @param array $dom_attributes            
56
     * @param int $segmentsWidth            
57
     * @return void
58
     */
59 7
    public function segmentsWidth(array &$dom_attributes, int $segmentsWidth)
60
    {
61 7
        $dom_attributes['segmentsWidth'] = $segmentsWidth;
62 7
    }
63
64
    /**
65
     * Horizontal starting angle.
66
     *
67
     * @param array $dom_attributes            
68
     * @param double $phiStart            
69
     * @return void
70
     */
71 1
    public function phiStart(array &$dom_attributes, float $phiStart)
72
    {
73 1
        $dom_attributes['phiStart'] = $phiStart;
74 1
    }
75
76
    /**
77
     * Horizontal sweep angle size.
78
     *
79
     * @param array $dom_attributes            
80
     * @param double $phiLength            
81
     * @return void
82
     */
83 1
    public function phiLength(array &$dom_attributes, float $phiLength)
84
    {
85 1
        $dom_attributes['phiLength'] = $phiLength;
86 1
    }
87
88
    /**
89
     * Vertical starting angle.
90
     *
91
     * @param array $dom_attributes            
92
     * @param double $thetaStart            
93
     * @return void
94
     */
95 1
    public function thetaStart(array &$dom_attributes, float $thetaStart)
96
    {
97 1
        $dom_attributes['thetaStart'] = $thetaStart;
98 1
    }
99
100
    /**
101
     * Vertical sweep angle size.
102
     *
103
     * @param array $dom_attributes            
104
     * @param double $thetaLength            
105
     * @return void
106
     */
107 1
    public function thetaLength(array &$dom_attributes, float $thetaLength)
108
    {
109 1
        $dom_attributes['thetaLength'] = $thetaLength;
110 1
    }
111
}
112