PHP CS-Fixer

This commit is contained in:
Eric Espie
2026-01-09 11:04:38 +01:00
parent 9d4fc345bc
commit 1538596db8
9 changed files with 46 additions and 34 deletions

View File

@@ -5,7 +5,8 @@ namespace Combodo\iTop\Application\UI\Base\Layout\DashletPanel;
use Combodo\iTop\Application\UI\Base\UIBlock;
use utils;
class DashletEntry extends UIBlock {
class DashletEntry extends UIBlock
{
public const BLOCK_CODE = 'ibo-dashlet-entry';
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/layouts/dashlet-panel/dashlet-entry';
@@ -18,7 +19,6 @@ class DashletEntry extends UIBlock {
protected $sDashletPreferredWidth;
protected $sDashletPreferredHeight;
public function __construct(string $sDashletClass, string $sDashletLabel, string $sDashletDescription, string $sDashletIconRelUrl, ?string $sId = null)
{
parent::__construct($sId);
@@ -159,5 +159,4 @@ class DashletEntry extends UIBlock {
return $this;
}
}

View File

@@ -5,7 +5,8 @@ namespace Combodo\iTop\Application\UI\Base\Layout\DashletPanel;
use Combodo\iTop\Application\UI\Base\UIBlock;
use Dashlet;
class DashletPanel extends UIBlock {
class DashletPanel extends UIBlock
{
public const BLOCK_CODE = 'ibo-dashlet-panel';
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/layouts/dashlet-panel/layout';
public const DEFAULT_JS_TEMPLATE_REL_PATH = 'base/layouts/dashlet-panel/layout';
@@ -19,17 +20,20 @@ class DashletPanel extends UIBlock {
$this->AddDataAttribute('role', static::BLOCK_CODE);
}
public function AddDashletEntry(DashletEntry $oDashletEntry) {
public function AddDashletEntry(DashletEntry $oDashletEntry)
{
$this->aDashletsEntries[] = $oDashletEntry;
return $this;
}
public function GetDashletEntries() : array {
public function GetDashletEntries(): array
{
return $this->aDashletsEntries;
}
public function SetDashletEntries(array $aDashletEntries) {
public function SetDashletEntries(array $aDashletEntries)
{
$this->aDashletsEntries = $aDashletEntries;
return $this;

View File

@@ -2,10 +2,10 @@
namespace Combodo\iTop\Application\UI\Base\Layout\DashletPanel;
use Combodo\iTop\Service\Dashboard\DashletService;
class DashletPanelFactory {
class DashletPanelFactory
{
public static function MakeForDashboardEditor(string $sId = null): DashletPanel
{
$oDashletPanel = new DashletPanel($sId);
@@ -15,16 +15,16 @@ class DashletPanelFactory {
foreach ($aAvailableDashlets as $sDashletClass => $aDashletInformation) {
$oDashletEntry = new DashletEntry($sDashletClass, $aDashletInformation['label'], $aDashletInformation['description'], $aDashletInformation['icon']);
if(isset($aDashletInformation['min_width'])) {
if (isset($aDashletInformation['min_width'])) {
$oDashletEntry->SetDashletMinWidth($aDashletInformation['min_width']);
}
if(isset($aDashletInformation['min_height'])) {
if (isset($aDashletInformation['min_height'])) {
$oDashletEntry->SetDashletMinHeight($aDashletInformation['min_height']);
}
if(isset($aDashletInformation['preferred_width'])) {
if (isset($aDashletInformation['preferred_width'])) {
$oDashletEntry->SetDashletPreferredWidth($aDashletInformation['preferred_width']);
}
if(isset($aDashletInformation['preferred_height'])) {
if (isset($aDashletInformation['preferred_height'])) {
$oDashletEntry->SetDashletPreferredHeight($aDashletInformation['preferred_height']);
}