From 89a75e6c1a6498a8e8324d8752d3db0792a3b4c5 Mon Sep 17 00:00:00 2001 From: Henning Leutz <leutz@pcsg.de> Date: Sat, 3 Sep 2016 11:08:23 +0200 Subject: [PATCH] style: code style, quiqqer/utils 1.4 --- composer.json | 51 +++++++++++++++++------------------ src/QUI/Cron/Manager.php | 7 +---- src/QUI/Cron/QuiqqerCrons.php | 2 -- 3 files changed, 26 insertions(+), 34 deletions(-) diff --git a/composer.json b/composer.json index 9ffc1ef..a681572 100644 --- a/composer.json +++ b/composer.json @@ -1,29 +1,28 @@ { - "name" : "quiqqer/cron", - "type" : "quiqqer-module", - "description" : "Provided currency calculation and a automtatic cron to get the Euro foreign exchange reference rates.", - "version" : "dev-dev", - "license" : "GPL-2.0+", - - "authors" : [{ - "name": "Henning Leutz", - "email": "leutz@pcsg.de", - "homepage": "http://www.pcsg.de", - "role": "Developer" - }], - - "support" : { - "email" : "support@pcsg.de" - }, - - "require": { - "quiqqer/quiqqer" : "*@dev", - "mtdowling/cron-expression": "1.0.*" - }, - - "autoload": { - "psr-0" : { - "QUI" : "src/" - } + "name": "quiqqer/cron", + "type": "quiqqer-module", + "description": "Provided currency calculation and a automtatic cron to get the Euro foreign exchange reference rates.", + "version": "dev-dev", + "license": "GPL-2.0+", + "authors": [ + { + "name": "Henning Leutz", + "email": "leutz@pcsg.de", + "homepage": "http://www.pcsg.de", + "role": "Developer" } + ], + "support": { + "email": "support@pcsg.de" + }, + "require": { + "quiqqer/quiqqer": "*@dev", + "quiqqer/utils": ">=1.4", + "mtdowling/cron-expression": "1.0.*" + }, + "autoload": { + "psr-0": { + "QUI": "src/" + } + } } diff --git a/src/QUI/Cron/Manager.php b/src/QUI/Cron/Manager.php index 67b5718..1bb9fb3 100644 --- a/src/QUI/Cron/Manager.php +++ b/src/QUI/Cron/Manager.php @@ -111,7 +111,6 @@ class Manager CronExpression::factory( "$min $hour $day $month $dayOfWeek" ); - } catch (\Exception $Exception) { throw new QUI\Exception($Exception->getMessage()); } @@ -237,7 +236,6 @@ class Manager // execute cron try { $this->executeCron($entry['id']); - } catch (\Exception $Exception) { $message = print_r($entry, true); $message .= "\n" . $Exception->getMessage(); @@ -418,7 +416,6 @@ class Manager $crons[$cronData['id']] = $cronData; } - foreach ($data as $entry) { $entry['cronTitle'] = ''; $entry['username'] = ''; @@ -429,7 +426,6 @@ class Manager try { $entry['username'] = $Users->get($entry['uid'])->getName(); - } catch (QUI\Exception $Exception) { } @@ -534,7 +530,7 @@ class Manager return array(); } - $Dom = QUI\Utils\XML::getDomFromXml($file); + $Dom = QUI\Utils\Text\XML::getDomFromXml($file); $crons = $Dom->getElementsByTagName('crons'); if (!$crons || !$crons->length) { @@ -565,7 +561,6 @@ class Manager if ($Title->length) { $title = QUI\Utils\DOM::getTextFromNode($Title->item(0)); - \QUI\System\Log::writeRecursive($title); } if ($Desc->length) { diff --git a/src/QUI/Cron/QuiqqerCrons.php b/src/QUI/Cron/QuiqqerCrons.php index 38001e4..bce951b 100644 --- a/src/QUI/Cron/QuiqqerCrons.php +++ b/src/QUI/Cron/QuiqqerCrons.php @@ -132,7 +132,6 @@ class QuiqqerCrons $Site->deactivate(); $deactivate[] = (int)$entry['id']; - } catch (QUI\Exception $Exception) { QUI\System\Log::writeException($Exception); } @@ -166,7 +165,6 @@ class QuiqqerCrons $Site->activate(); $activate[] = (int)$entry['id']; - } catch (QUI\Exception $Exception) { QUI\System\Log::writeException($Exception); } -- GitLab