Skip to content

Commit

Permalink
Update code style for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
luukverhoeven committed May 13, 2024
1 parent bfe6976 commit 45f1938
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 14 deletions.
6 changes: 4 additions & 2 deletions component.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
/**
* Class component_base
*
* @package block_configurable_reports
* @author Juan leyva <http://www.twitter.com/jleyvadelgado>
* @copyright 2020 Juan Leyva <[email protected]>
* @package block_configurable_reports
* @author Juan leyva <http://www.twitter.com/jleyvadelgado>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class component_base {

Expand Down
10 changes: 10 additions & 0 deletions components/conditions/component.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
* @copyright 2020 Juan Leyva <[email protected]>
* @package block_configurable_reports
* @author Juan leyva <http://www.twitter.com/jleyvadelgado>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

/**
* Class component_conditions
*
* @copyright 2020 Juan Leyva <[email protected]>
* @package block_configurable_reports
* @author Juan leyva <http://www.twitter.com/jleyvadelgado>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class component_conditions extends component_base {

Expand Down
9 changes: 4 additions & 5 deletions components/plot/bar/graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
}

if ($g['id'] == $id) {
//
require_once($CFG->dirroot . "/blocks/configurable_reports/lib/pChart2/class/pDraw.php");
require_once($CFG->dirroot . "/blocks/configurable_reports/lib/pChart2/class/pData.php");
require_once($CFG->dirroot . "/blocks/configurable_reports/lib/pChart2/class/pColor.php");
Expand Down Expand Up @@ -139,7 +138,7 @@
$mypicture->setFontProperties([
"FontName" => "$fontpath/Cairo-Regular.ttf",
"FontSize" => $fontsize,
"Color" => new \pChart\pColor(0 , 0 , 0),
"Color" => new \pChart\pColor(0, 0, 0),
]);

[$legendwidth, $legendheight] = array_values($mypicture->getLegendSize());
Expand Down Expand Up @@ -180,9 +179,9 @@
"DisplayOffset" => 5,
"DrawSubTicks" => true,
];
/* Draw the chart */
$pCharts = new \pChart\pCharts($mypicture);
$pCharts->drawBarChart($chartsettings);

$pcharts = new \pChart\pCharts($mypicture);
$pcharts->drawBarChart($chartsettings);

$mypicture->setShadow(false);
$mypicture->drawLegend($legendx, $legendy);
Expand Down
2 changes: 1 addition & 1 deletion components/plot/line/graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@
ob_clean(); // Hack to clear output and send only IMAGE data to browser.
$test->Stroke();
}
}
}
10 changes: 4 additions & 6 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,25 @@
* @return void
*/
function cr_print_js_function() {
?>
<script>
echo '<script>
function printDiv(id) {
let cdiv, tmpw;
cdiv = document.getElementById(id);
tmpw = window.open(" ", "Print");
tmpw.document.open();
tmpw.document.write('<html><body>');
tmpw.document.write(\'<html><body>\');
tmpw.document.write(cdiv.innerHTML);
tmpw.document.write('</body></html>');
tmpw.document.write(\'</body></html>\');
tmpw.document.close();
setTimeout(function() {
tmpw.print();
tmpw.close();
}, 1000);
}
</script>
<?php
</script>';
}

/**
Expand Down
10 changes: 10 additions & 0 deletions reports/timeline/report.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
* @copyright 2020 Juan Leyva <[email protected]>
* @package block_configurable_reports
* @author Juan leyva <http://www.twitter.com/jleyvadelgado>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

/**
* Class report_timeline
*
* @copyright 2020 Juan Leyva <[email protected]>
* @package block_configurable_reports
* @author Juan leyva <http://www.twitter.com/jleyvadelgado>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class report_timeline extends report_base {

Expand Down

0 comments on commit 45f1938

Please sign in to comment.