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

PlaneMethods   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 39
ccs 6
cts 6
cp 1
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A height() 0 4 1
A width() 0 4 1
1
<?php
2
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jun 27, 2016 - 4:42:18 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         PlaneMethods.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 PlaneMethods
27
{
28
29
    /**
30
     * The plane primitive defines a flat surface.
31
     * Note that because it is flat,
32
     * only a single side of the plane will be rendered if side: double is not specified on the material component.
33
     */
34
    const DEFAULTS = array(
35
        /* Width along the X axis. */
36
        'width' => 1,
37
        /* Height along the Y axis. */
38
        'height' => 1
39
    );
40
41
    /**
42
     * Height along 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 $height            
0 ignored issues
show
Documentation introduced by
Consider making the type for parameter $height a bit more specific; maybe use double.
Loading history...
46
     * @return void
47
     */
48 6
    public function height(array &$dom_attributes, float $height)
49
    {
50 6
        $dom_attributes['height'] = $height;
51 6
    }
52
53
    /**
54
     * Width along the X 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 $width            
0 ignored issues
show
Documentation introduced by
Consider making the type for parameter $width a bit more specific; maybe use double.
Loading history...
58
     * @return void
59
     */
60 6
    public function width(array &$dom_attributes, float $width)
61
    {
62 6
        $dom_attributes['width'] = $width;
63 6
    }
64
}
65