ScatterChartRenderer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handles() 0 3 2
A headElements() 0 5 1
1
<?php namespace rtens\domin\delivery\web\renderers\charting;
2
3
use rtens\domin\delivery\web\HeadElements;
4
use rtens\domin\delivery\web\renderers\charting\charts\ScatterChart;
5
6
class ScatterChartRenderer extends ChartRenderer {
7
8
    /**
9
     * @param mixed $value
10
     * @return bool
11
     */
12
    public function handles($value) {
13
        return parent::handles($value) && $value instanceof ScatterChart;
14
    }
15
16
    /**
17
     * @param mixed $value
18
     * @return array|\rtens\domin\delivery\web\Element[]
19
     */
20
    public function headElements($value) {
21
        $elements = parent::headElements($value);
22
        $elements[] = HeadElements::script('http://dima117.github.io/Chart.Scatter/Chart.Scatter.min.js');
23
        return $elements;
24
    }
25
}