Completed
Branch master (fb685e)
by Marko
02:15
created

DefaultMethods::updateY()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 4
loc 4
ccs 3
cts 3
cp 1
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jun 27, 2016 - 2:54:40 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         DefaultMethods.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\Scale\Methods;
25
26 View Code Duplication
class DefaultMethods
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
27
{
28
29
    /**
30
     * Roll, rotation about the X-axis.
31
     *
32
     * @param &array $dom_attributes            
0 ignored issues
show
Documentation introduced by
The doc-type &array could not be parsed: Unknown type name "&array" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
33
     * @param float|int $roll            
0 ignored issues
show
Documentation introduced by
Consider making the type for parameter $roll a bit more specific; maybe use double.
Loading history...
34
     * @return void
35
     */
36 51
    public function updateX(array &$dom_attributes, float $roll)
37
    {
38 51
        $dom_attributes['x'] = $roll;
39 51
    }
40
41
    /**
42
     * Pitch, rotation about the Y-axis.
43
     *
44
     * @param &array $dom_attributes            
0 ignored issues
show
Documentation introduced by
The doc-type &array could not be parsed: Unknown type name "&array" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
45
     * @param float|int $pitch            
0 ignored issues
show
Documentation introduced by
Consider making the type for parameter $pitch a bit more specific; maybe use double.
Loading history...
46
     * @return void
47
     */
48 51
    public function updateY(array &$dom_attributes, float $pitch)
49
    {
50 51
        $dom_attributes['y'] = $pitch;
51 51
    }
52
53
    /**
54
     * Yaw, rotation about the Z-axis.
55
     *
56
     * @param &array $dom_attributes            
0 ignored issues
show
Documentation introduced by
The doc-type &array could not be parsed: Unknown type name "&array" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
57
     * @param float|int $yaw            
0 ignored issues
show
Documentation introduced by
Consider making the type for parameter $yaw a bit more specific; maybe use double.
Loading history...
58
     * @return void
59
     */
60 51
    public function updateZ(array &$dom_attributes, float $yaw)
61
    {
62 51
        $dom_attributes['z'] = $yaw;
63 51
    }
64
}
65