Skip to content
Code-Schnipsel Gruppen Projekte
Commit 17526660 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'main' into 'next-3.x'

Update 'next-3.x' with latest changes from 'main'

See merge request !24
Übergeordnete ef9159eb 0911f050
No related branches found
No related tags found
1 Merge Request!24Update 'next-3.x' with latest changes from 'main'
Pipeline #15958 bestanden mit Phase
in 1 Minute und 36 Sekunden
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="1.11.8" installed="1.11.8" location="./tools/phpstan" copy="false"/>
<phar name="phpstan" version="1.*" installed="1.12.13" location="./tools/phpstan" copy="false"/>
<phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/>
<phar name="phpcs" version="^3.9.2" installed="3.9.2" location="./tools/phpcs" copy="false"/>
<phar name="phpcbf" version="^3.9.2" installed="3.9.2" location="./tools/phpcbf" copy="false"/>
......
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$cronId of method QUI\\\\Cron\\\\Console\\\\ExecCrons\\:\\:runCron\\(\\) expects bool\\|int, string given\\.$#"
count: 1
path: src/QUI/Cron/Console/ExecCrons.php
-
message: "#^Access to an undefined property DOMNode\\:\\:\\$tagName\\.$#"
count: 1
path: src/QUI/Cron/Manager.php
-
message: "#^PHPDoc tag @return with type QUI\\\\Cron\\\\Manager is not subtype of native type static\\(QUI\\\\Cron\\\\Manager\\)\\.$#"
count: 1
path: src/QUI/Cron/Manager.php
-
message: "#^Call to an undefined method QUI\\\\Projects\\\\Site\\:\\:deactivate\\(\\)\\.$#"
count: 1
path: src/QUI/Cron/QuiqqerCrons.php
......@@ -22,8 +22,6 @@ class ExecCrons extends QUI\System\Console\Tool
}
/**
* (non-PHPdoc)
*
* @throws Exception
* @see \QUI\System\Console\Tool::execute()
*/
......@@ -101,7 +99,7 @@ class ExecCrons extends QUI\System\Console\Tool
$cronId = $this->readInput();
try {
$this->runCron($cronId);
$this->runCron((int)$cronId);
} catch (QUI\Exception $Exception) {
$this->writeLn($Exception->getMessage(), 'red');
$this->resetColor();
......@@ -215,7 +213,7 @@ class ExecCrons extends QUI\System\Console\Tool
* @param Boolean|Integer $cronId - ID of the cron
* @throws QUI\Exception
*/
public function runCron(bool|int $cronId = false): void
public function runCron(bool | int $cronId = false): void
{
$Manager = new QUI\Cron\Manager();
$cron = $Manager->getCronById($cronId);
......
......@@ -103,11 +103,11 @@ class Manager
*/
public function add(
string $cron,
int|string $min,
int|string $hour,
int|string $day,
int|string $month,
int|string $dayOfWeek,
int | string $min,
int | string $hour,
int | string $day,
int | string $month,
int | string $dayOfWeek,
array $params = []
): void {
Permission::checkPermission('quiqqer.cron.add');
......@@ -167,11 +167,11 @@ class Manager
public function edit(
int $cronId,
string $cron,
int|string $min,
int|string $hour,
int|string $day,
int|string $month,
int|string $dayOfWeek,
int | string $min,
int | string $hour,
int | string $day,
int | string $month,
int | string $dayOfWeek,
array $params = []
): void {
Permission::checkPermission('quiqqer.cron.edit');
......@@ -410,9 +410,6 @@ class Manager
/**
* Execute a cron
*
* @param integer $cronId - ID of the cron
*
* @return Manager
* @throws QUI\Exception
*/
public function executeCron(int $cronId): static
......@@ -516,7 +513,7 @@ class Manager
* @return array|false - Cron Data
* @throws Exception
*/
public function getCronById(int $cronId): bool|array
public function getCronById(int $cronId): bool | array
{
$result = QUI::getDataBase()->fetch([
'from' => $this->table(),
......@@ -541,7 +538,7 @@ class Manager
*
* @return array|false - Cron Data
*/
public function getCronData(string $cron): bool|array
public function getCronData(string $cron): bool | array
{
$availableCrons = $this->getAvailableCrons();
......@@ -822,7 +819,11 @@ class Manager
for ($j = 0; $j < $Params->length; $j++) {
$ParamsNode = $Params->item($j);
if ($ParamsNode->parentNode && $ParamsNode->parentNode->tagName === 'cron') {
if (
$ParamsNode->parentNode
&& isset($ParamsNode->parentNode->tagName)
&& $ParamsNode->parentNode->tagName === 'cron'
) {
$CronParams = $ParamsNode->getElementsByTagName('param');
break;
}
......
......@@ -192,7 +192,10 @@ class QuiqqerCrons
foreach ($result as $entry) {
try {
$Site = $Project->get((int)$entry['id']);
$Site->deactivate();
if (method_exists($Site, 'deactivate')) {
$Site->deactivate();
}
$deactivate[] = (int)$entry['id'];
} catch (QUI\Exception $Exception) {
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren