diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index 2cce339..793693f 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -11,6 +11,6 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
- php-version: 7.4
+ php-version: 8.2
- name: Check style
uses: wilkware/action-ips-style@main
\ No newline at end of file
diff --git a/.style b/.style
index fe04d92..c3da0b4 160000
--- a/.style
+++ b/.style
@@ -1 +1 @@
-Subproject commit fe04d922f53d36e19d91a7f8dfe4ca7c66ed62a4
+Subproject commit c3da0b498e05763595d29a223dbad7e9c12ce556
diff --git a/Abfall_IO/module.php b/Abfall_IO/module.php
index 1161edc..8101c46 100644
--- a/Abfall_IO/module.php
+++ b/Abfall_IO/module.php
@@ -478,7 +478,8 @@ public function Update()
}
// CSV format
else {
- $csv = array_map(function ($v) {
+ $csv = array_map(function ($v)
+ {
$data = str_getcsv($v, ';');
return $data;
}, explode("\n", $res));
diff --git a/libs/ServiceHelper.php b/libs/ServiceHelper.php
index 6b042a6..6f77849 100644
--- a/libs/ServiceHelper.php
+++ b/libs/ServiceHelper.php
@@ -134,7 +134,8 @@ private function OrderData(array $arr, string $key = null, string $direction = '
}
}
// Sort by passed keys
- usort($arr, function ($a, $b) use ($props) {
+ usort($arr, function ($a, $b) use ($props)
+ {
foreach ($props as $key => $val) {
if ($a[$key] == $b[$key]) {
continue;
diff --git a/libs/VisualisationHelper.php b/libs/VisualisationHelper.php
index c6f21ed..c93ef74 100644
--- a/libs/VisualisationHelper.php
+++ b/libs/VisualisationHelper.php
@@ -30,18 +30,19 @@ protected function BuildWidget(array $waste, string $skin)
// (0) tabel with all infos
$table = [];
// (1) build new data array
- foreach($waste as $key => $value) {
+ foreach ($waste as $key => $value) {
$id = @$this->GetIDForIdent($value['ident']);
if ($id !== false) {
$name = IPS_GetName($id);
$type = $this->RecognizeWaste($name);
$date = $value['date'];
$days = $this->CalcDaysToDate($date);
- $table[] = ['name' => $name, 'type' => $type, 'date' => $date, 'days' => $days ];
+ $table[] = ['name' => $name, 'type' => $type, 'date' => $date, 'days' => $days];
}
}
// (2) sort waste by date
- usort($table, function ($a, $b) {
+ usort($table, function ($a, $b)
+ {
return strtotime($a['date']) - strtotime($b['date']);
});
// (3) build html texts
@@ -57,7 +58,7 @@ protected function BuildWidget(array $waste, string $skin)
// generate widget for tile visu
if ($next == '') {
$next = date('d.m.', strtotime($table[0]['date']));
- $next = $this->Translate(date('D', strtotime($table[0]['date']))) . '. ' . $next;
+ $next = $this->Translate(date('D', strtotime($table[0]['date']))) . '. ' . $next;
}
$textS = '';
$textM = '';
@@ -65,10 +66,10 @@ protected function BuildWidget(array $waste, string $skin)
// date infos
$days = $table[0]['days'];
$day = strtotime($table[0]['date']);
- $wd = $this->Translate (date('l'));
+ $wd = $this->Translate(date('l'));
$sd = date('d.m.', $day);
$wn = $table[0]['name'];
- if($days > 1) {
+ if ($days > 1) {
$textS = "in $days " . $this->Translate('days');
$textM = "$wn
" . $this->Translate('Next pickup:') . "
in $days " . $this->Translate('days') . '
' . $this->Translate('on') . " $wd $sd";
} else {
@@ -77,10 +78,10 @@ protected function BuildWidget(array $waste, string $skin)
}
// table rows
$textL = '';
- foreach($table as $row) {
+ foreach ($table as $row) {
if ($row['days'] == 0) $text = $this->Translate('Today');
if ($row['days'] == 1) $text = $this->Translate('Tomorrow');
- if ($row['days'] >= 2) $text = $row['days'] . ' ' . $this->Translate('days');
+ if ($row['days'] >= 2) $text = $row['days'] . ' ' . $this->Translate('days');
$textL .= '