RectPatternCross   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 15
dl 0
loc 35
ccs 0
cts 26
cp 0
rs 10
c 1
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A SetDensity() 0 4 1
A SetPos() 0 5 1
A DoPattern() 0 4 1
A SetOrder() 0 4 1
1
<?php
2
3
/**
4
 * JPGraph v4.0.3
5
 */
6
7
namespace Amenadiel\JpGraph\Graph;
8
9
/**
10
 * @class RectPatternCross
11
 * // Vert/Hor crosses
12
 */
13
class RectPatternCross extends RectPattern
14
{
15
    private $vert;
16
    private $hor;
17
18
    public function __construct($aColor = 'black', $aWeight = 1)
19
    {
20
        parent::__construct($aColor, $aWeight);
21
        $this->vert = new RectPatternVert($aColor, $aWeight);
22
        $this->hor  = new RectPatternHor($aColor, $aWeight);
23
    }
24
25
    public function SetOrder($aDepth)
26
    {
27
        $this->vert->SetOrder($aDepth);
0 ignored issues
show
Bug introduced by
The method SetOrder() does not exist on Amenadiel\JpGraph\Graph\RectPatternVert. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
        $this->vert->/** @scrutinizer ignore-call */ 
28
                     SetOrder($aDepth);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
28
        $this->hor->SetOrder($aDepth);
0 ignored issues
show
Bug introduced by
The method SetOrder() does not exist on Amenadiel\JpGraph\Graph\RectPatternHor. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        $this->hor->/** @scrutinizer ignore-call */ 
29
                    SetOrder($aDepth);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
29
    }
30
31
    public function SetPos($aRect)
32
    {
33
        parent::SetPos($aRect);
34
        $this->vert->SetPos($aRect);
35
        $this->hor->SetPos($aRect);
36
    }
37
38
    public function SetDensity($aDens)
39
    {
40
        $this->vert->SetDensity($aDens);
41
        $this->hor->SetDensity($aDens);
42
    }
43
44
    public function DoPattern($aImg)
45
    {
46
        $this->vert->DoPattern($aImg);
47
        $this->hor->DoPattern($aImg);
48
    }
49
}
50