TorusKnotMethods   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 3 Features 0
Metric Value
wmc 6
c 5
b 3
f 0
lcom 0
cbo 0
dl 0
loc 76
ccs 18
cts 18
cp 1
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A radius() 0 4 1
A radiusTubular() 0 4 1
A segmentsRadial() 0 4 1
A segmentsTubular() 0 4 1
A p() 0 4 1
A q() 0 4 1
1
<?php
2
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jun 27, 2016 - 6:05:03 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         TorusKnotMethods.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 TorusKnotMethods
27
{
28
    /**
29
     * Radius that contains the torus knot.
30
     *
31
     * @param array $dom_attributes            
32
     * @param double $radius            
33
     * @return void
34
     */
35 1
    public function radius(array &$dom_attributes, float $radius)
36
    {
37 1
        $dom_attributes['radius'] = $radius;
38 1
    }
39
40
    /**
41
     * Radius of the tubes of the torus knot.
42
     *
43
     * @param array $dom_attributes            
44
     * @param double $radiusTubular            
45
     * @return void
46
     */
47 1
    public function radiusTubular(array &$dom_attributes, float $radiusTubular)
48
    {
49 1
        $dom_attributes['radiusTubular'] = $radiusTubular;
50 1
    }
51
52
    /**
53
     * Number of segments along the circumference of the tube ends.
54
     * A higher number means the tube will be more round.
55
     *
56
     * @param array $dom_attributes            
57
     * @param int $segmentsRadial            
58
     * @return void
59
     */
60 1
    public function segmentsRadial(array &$dom_attributes, int $segmentsRadial)
61
    {
62 1
        $dom_attributes['segmentsRadial'] = $segmentsRadial;
63 1
    }
64
65
    /**
66
     * Number of segments along the circumference of the tube face.
67
     * A higher number means the tube will be more round.
68
     *
69
     * @param array $dom_attributes            
70
     * @param int $segmentsTubular            
71
     * @return void
72
     */
73 1
    public function segmentsTubular(array &$dom_attributes, int $segmentsTubular)
74
    {
75 1
        $dom_attributes['segmentsTubular'] = $segmentsTubular;
76 1
    }
77
78
    /**
79
     * Number that helps define the pretzel shape.
80
     *
81
     * @param array $dom_attributes            
82
     * @param int $p            
83
     * @return void
84
     */
85 1
    public function p(array &$dom_attributes, int $p)
0 ignored issues
show
Coding Style introduced by
This method's name is shorter than the configured minimum length of 2 characters.

Even though PHP does not care about the name of your methods, it is generally a good practice to choose method names which can be easily understood by other human readers.

Loading history...
86
    {
87 1
        $dom_attributes['p'] = $p;
88 1
    }
89
90
    /**
91
     * Number that helps define the pretzel shape.
92
     *
93
     * @param array $dom_attributes            
94
     * @param int $q            
95
     * @return void
96
     */
97 1
    public function q(array &$dom_attributes, int $q)
0 ignored issues
show
Coding Style introduced by
This method's name is shorter than the configured minimum length of 2 characters.

Even though PHP does not care about the name of your methods, it is generally a good practice to choose method names which can be easily understood by other human readers.

Loading history...
98
    {
99 1
        $dom_attributes['q'] = $q;
100 1
    }
101
}
102