e107inc/e107

View on GitHub
e107_handlers/chart_class.php

Summary

Maintainability
A
0 mins
Test Coverage
F
3%

Assigning array{title:'Company Performance',hAxis:array{title:'Year',titleTextStyle:array{color:'#333'}},vAxis:array{minValue:0}} to property but \e_chart->options is array<string>|array<string>|array{scaleFontSize:14,annotateDisplay:true,bezierCurve:true,inGraphDataShow:false}</string></string>
Open

            $this->options =    array(
Severity: Minor
Found in e107_handlers/chart_class.php by phan

Returning type string but render() is declared to return null
Open

        return '<canvas class="e-graph e-chart" id="'.$id.'" height="'.$height.'" width="'.$width.'" >HTML5 Canvas not supported.</canvas>';
Severity: Minor
Found in e107_handlers/chart_class.php by phan

Default value for int $width can't be string
Open

    public function render($id, $width='100%',$height=300)
Severity: Minor
Found in e107_handlers/chart_class.php by phan

array to string comparison
Open

        if($data == 'demo')
Severity: Info
Found in e107_handlers/chart_class.php by phan

Returning type string but render() is declared to return null
Open

            return "<div class='e-graph e-chart' id='".$id."' style='width: ".$width."; height: ".$height."px;'></div>";
Severity: Minor
Found in e107_handlers/chart_class.php by phan

Returning type '\x3cdiv class=\'alert alert-info alert-block\'\x3eNo chart data provided\x3c/div\x3e' but render() is declared to return null
Open

            return "<div class='alert alert-info alert-block'>No chart data provided</div>";    
Severity: Minor
Found in e107_handlers/chart_class.php by phan

Assigning array<string>|array<string>|array<string>|array<string>|array<string>|array<string users>|array<string>,titleFontSize:14,titleTextStyle:array{color:'#ccc'},gridlines:array{color:'transparent'},textStyle:array{color:'#ccc'}}&gt;|array<string></string></string></string></string></string></string></string></string> to property but \e_chart->options is array<string>|array<string>|array{scaleFontSize:14,annotateDisplay:true,bezierCurve:true,inGraphDataShow:false}</string></string>
Open

            $this->options = $data;    
Severity: Minor
Found in e107_handlers/chart_class.php by phan

array to string comparison
Open

        if($this->provider == 'google' && $data == 'demo')
Severity: Info
Found in e107_handlers/chart_class.php by phan

Assigning array{title:'Company Performance',hAxis:array{title:'Year',titleTextStyle:array{color:'#333'}},vAxis:array{minValue:0}} to property but \e_chart->options is array{scaleFontSize:14,annotateDisplay:true,bezierCurve:true,inGraphDataShow:false}
Open

            $this->options =    array(
Severity: Minor
Found in e107_handlers/chart_class.php by phan

Assigning array{title:'Company Performance',hAxis:array{title:'Year',titleTextStyle:array{color:'#333'}},vAxis:array{minValue:0}} to property but \e_chart->options is array<string>|array{scaleFontSize:14,annotateDisplay:true,bezierCurve:true,inGraphDataShow:false}</string>
Open

            $this->options =    array(
Severity: Minor
Found in e107_handlers/chart_class.php by phan

There are no issues that match your filters.

Category
Status