Conditions | 6 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 6.2163 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 3 | public function GetImg($aMark, $aIdx) |
|
33 | { |
||
34 | 3 | $n = $this->an[$aMark]; |
|
35 | 3 | if (is_string($aIdx)) { |
|
36 | 3 | if (!in_array($aIdx, $this->colors, true)) { |
|
37 | Util\JpGraphError::RaiseL(23001, $this->name, $aIdx); //('This marker "'.($this->name).'" does not exist in color: '.$aIdx); |
||
38 | } |
||
39 | 3 | $idx = $this->index[$aIdx]; |
|
40 | 1 | } elseif (!is_integer($aIdx) || |
|
41 | 1 | (is_integer($aIdx) && $aIdx > $this->maxidx)) { |
|
42 | Util\JpGraphError::RaiseL(23002, $this->name); //('Mark color index too large for marker "'.($this->name).'"'); |
||
43 | } else { |
||
44 | 1 | $idx = $aIdx; |
|
45 | } |
||
46 | |||
47 | 3 | return Image::CreateFromString(base64_decode($this->{$n}[$idx][1], true)); |
|
|
|||
48 | } |
||
55 |