Skip to content

Commit

Permalink
add override atribute (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkSide666 authored Jan 21, 2025
1 parent 9a6eb0e commit 57597d1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Chart.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class Chart extends View
/** @var ColorGenerator */
public $colorGenerator;

#[\Override]
protected function init(): void
{
parent::init();
Expand All @@ -62,6 +63,7 @@ protected function init(): void
$this->getApp()->requireJs($this->getApp()->cdn['chart.js'] . '/chart.min.js');
}

#[\Override]
public function renderView(): void
{
$this->js(true, new JsExpression('new Chart([], []);', [$this->name, $this->getConfig()]));
Expand Down
1 change: 1 addition & 0 deletions src/ChartBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class ChartBox extends View
/** @var string */
public $label = 'Chart Box';

#[\Override]
protected function init(): void
{
$this->defaultTemplate = dirname(__DIR__) . '/template/chartbox.html';
Expand Down
2 changes: 2 additions & 0 deletions src/PieChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class PieChart extends Chart
{
public string $type = self::TYPE_PIE;

#[\Override]
public function prepareDatasets(): void
{
$datasets = [];
Expand Down Expand Up @@ -51,6 +52,7 @@ public function prepareDatasets(): void
$this->setDatasets($datasets);
}

#[\Override]
public function setCurrencyLabel(string $char = '', string $axis = 'y', int $digits = 2)
{
$options = [
Expand Down
1 change: 1 addition & 0 deletions src/ScatterChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class ScatterChart extends Chart
/** @var string R (radius) field name */
protected $rField;

#[\Override]
public function prepareDatasets(): void
{
$columns = $this->columns;
Expand Down

0 comments on commit 57597d1

Please sign in to comment.