|
@@ -138,7 +138,7 @@ class Card extends Widget
|
|
|
*/
|
|
|
protected function init()
|
|
|
{
|
|
|
- $this->id('metric-card-' . Str::random(8));
|
|
|
+ $this->id('metric-card-'.Str::random(8));
|
|
|
$this->class('card');
|
|
|
}
|
|
|
|
|
@@ -348,7 +348,7 @@ class Card extends Widget
|
|
|
*/
|
|
|
public function chartLabels($label)
|
|
|
{
|
|
|
- $this->chartOptions['labels'] = (array)$label;
|
|
|
+ $this->chartOptions['labels'] = (array) $label;
|
|
|
|
|
|
$this->useChart();
|
|
|
|
|
@@ -364,7 +364,7 @@ class Card extends Widget
|
|
|
*/
|
|
|
public function chartColors($colors)
|
|
|
{
|
|
|
- $this->chartOptions['colors'] = (array)$colors;
|
|
|
+ $this->chartOptions['colors'] = (array) $colors;
|
|
|
|
|
|
$this->useChart();
|
|
|
|
|
@@ -399,7 +399,7 @@ class Card extends Widget
|
|
|
*/
|
|
|
protected function setUpChart()
|
|
|
{
|
|
|
- if (!$chart = $this->chart) {
|
|
|
+ if (! $chart = $this->chart) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -410,7 +410,7 @@ class Card extends Widget
|
|
|
|
|
|
// 颜色
|
|
|
if (empty($this->chartOptions['colors'])) {
|
|
|
- $this->chartOptions['colors'] = (array)Admin::color()->get($this->style);
|
|
|
+ $this->chartOptions['colors'] = (array) Admin::color()->get($this->style);
|
|
|
}
|
|
|
|
|
|
// 图表配置选项
|
|
@@ -446,7 +446,7 @@ class Card extends Widget
|
|
|
*/
|
|
|
public function addScript()
|
|
|
{
|
|
|
- if (!$this->allowBuildRequest()) {
|
|
|
+ if (! $this->allowBuildRequest()) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -525,7 +525,7 @@ JS;
|
|
|
*/
|
|
|
protected function setUpCardHeight()
|
|
|
{
|
|
|
- if (!$height = $this->height) {
|
|
|
+ if (! $height = $this->height) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -572,7 +572,7 @@ JS;
|
|
|
'header' => $this->renderHeader(),
|
|
|
'content' => $this->renderContent(),
|
|
|
],
|
|
|
- (array)optional($this->chart)->valueResult()
|
|
|
+ (array) optional($this->chart)->valueResult()
|
|
|
);
|
|
|
}
|
|
|
}
|