diff --git a/Admin/Installer.php b/Admin/Installer.php
index 762d171..1c2a079 100755
--- a/Admin/Installer.php
+++ b/Admin/Installer.php
@@ -97,9 +97,9 @@ final class Installer extends InstallerAbstract
continue;
}
- $taskAttrType[$attribute['name']] = !\is_array($responseData['response'])
- ? $responseData['response']->toArray()
- : $responseData['response'];
+ $taskAttrType[$attribute['name']] = \is_array($responseData['response'])
+ ? $responseData['response']
+ : $responseData['response']->toArray();
$isFirst = true;
foreach ($attribute['l11n'] as $language => $l11n) {
@@ -169,9 +169,9 @@ final class Installer extends InstallerAbstract
continue;
}
- $attrValue = !\is_array($responseData['response'])
- ? $responseData['response']->toArray()
- : $responseData['response'];
+ $attrValue = \is_array($responseData['response'])
+ ? $responseData['response']
+ : $responseData['response']->toArray();
$taskAttrValue[$attribute['name']][] = $attrValue;
diff --git a/Controller/ApiController.php b/Controller/ApiController.php
index 28c9db4..04fcb8d 100755
--- a/Controller/ApiController.php
+++ b/Controller/ApiController.php
@@ -429,7 +429,7 @@ final class ApiController extends Controller
if (($val['status'] = !TaskStatus::isValidValue((int) $request->getData('status')))
|| ($val['due'] = !((bool) \strtotime((string) $request->getData('due'))))
|| ($val['task'] = !(\is_numeric($request->getData('task'))))
- || ($val['forward'] = !(\is_numeric(!$request->hasData('forward') ? $request->header->account : $request->getData('forward'))))
+ || ($val['forward'] = !(\is_numeric($request->hasData('forward') ? $request->getData('forward') : $request->header->account)))
) {
return $val;
}
diff --git a/Theme/Backend/Components/Tasks/list.tpl.php b/Theme/Backend/Components/Tasks/list.tpl.php
index cc4797e..01825d7 100755
--- a/Theme/Backend/Components/Tasks/list.tpl.php
+++ b/Theme/Backend/Components/Tasks/list.tpl.php
@@ -31,7 +31,7 @@ use phpOMS\Uri\UriFactory;
tasks as $key => $task) : ++$c;
- $url = UriFactory::build(!empty($task->redirect) ? $task->redirect : ('task/single?{?}&id=' . $task->id));
+ $url = UriFactory::build(empty($task->redirect) ? 'task/single?{?}&id=' . $task->id : ($task->redirect));
$color = 'darkred';
if ($task->getStatus() === TaskStatus::DONE) { $color = 'green'; }
diff --git a/Theme/Backend/dashboard-task.tpl.php b/Theme/Backend/dashboard-task.tpl.php
index 401d5ec..7eaffb1 100755
--- a/Theme/Backend/dashboard-task.tpl.php
+++ b/Theme/Backend/dashboard-task.tpl.php
@@ -32,9 +32,9 @@ $tasksList = $this->getData('tasks') ?? [];
$task) : ++$c;
- $url = UriFactory::build(!empty($task->redirect)
- ? $task->redirect
- : ('task/single?{?}&id=' . $task->id)
+ $url = UriFactory::build(empty($task->redirect)
+ ? 'task/single?{?}&id=' . $task->id
+ : ($task->redirect)
);
?>
diff --git a/Theme/Backend/task-dashboard.tpl.php b/Theme/Backend/task-dashboard.tpl.php
index 4c27a62..951b6b6 100755
--- a/Theme/Backend/task-dashboard.tpl.php
+++ b/Theme/Backend/task-dashboard.tpl.php
@@ -53,9 +53,9 @@ echo $this->getData('nav')->render(); ?>
$task) : ++$c;
- $url = UriFactory::build(!empty($task->redirect)
- ? '{/app}/' . $task->redirect
- : ('task/single?{?}&id=' . $task->id),
+ $url = UriFactory::build(empty($task->redirect)
+ ? 'task/single?{?}&id=' . $task->id
+ : ('{/app}/' . $task->redirect),
['$id' => $task->id]
);
?>
@@ -79,7 +79,7 @@ echo $this->getData('nav')->render(); ?>
|
getTags(); foreach ($tags as $tag) : ?>
- = !empty($tag->icon) ? '' : ''; ?>= $this->printHtml($tag->getL11n()); ?>
+ = empty($tag->icon) ? '' : ''; ?>= $this->printHtml($tag->getL11n()); ?>
|
@@ -112,9 +112,9 @@ echo $this->getData('nav')->render(); ?>
$task) : ++$c;
- $url = UriFactory::build(!empty($task->redirect)
- ? '{/app}/' . $task->redirect
- : ('task/single?{?}&id=' . $task->id),
+ $url = UriFactory::build(empty($task->redirect)
+ ? 'task/single?{?}&id=' . $task->id
+ : ('{/app}/' . $task->redirect),
['$id' => $task->id]
);
?>
@@ -138,7 +138,7 @@ echo $this->getData('nav')->render(); ?>
|
getTags(); foreach ($tags as $tag) : ?>
- = !empty($tag->icon) ? '' : ''; ?>= $this->printHtml($tag->getL11n()); ?>
+ = empty($tag->icon) ? '' : ''; ?>= $this->printHtml($tag->getL11n()); ?>
|
@@ -176,9 +176,9 @@ echo $this->getData('nav')->render(); ?>
}
++$c;
- $url = UriFactory::build(!empty($task->redirect)
- ? '{/app}/' . $task->redirect
- : ('task/single?{?}&id=' . $task->id),
+ $url = UriFactory::build(empty($task->redirect)
+ ? 'task/single?{?}&id=' . $task->id
+ : ('{/app}/' . $task->redirect),
['$id' => $task->id]
);
?>
@@ -202,7 +202,7 @@ echo $this->getData('nav')->render(); ?>
|
getTags(); foreach ($tags as $tag) : ?>
- = !empty($tag->icon) ? '' : ''; ?>= $this->printHtml($tag->getL11n()); ?>
+ = empty($tag->icon) ? '' : ''; ?>= $this->printHtml($tag->getL11n()); ?>
|
@@ -242,9 +242,9 @@ echo $this->getData('nav')->render(); ?>
$task) : ++$c;
- $url = UriFactory::build(!empty($task->redirect)
- ? '{/app}/' . $task->redirect
- : ('task/single?{?}&id=' . $task->id),
+ $url = UriFactory::build(empty($task->redirect)
+ ? 'task/single?{?}&id=' . $task->id
+ : ('{/app}/' . $task->redirect),
['$id' => $task->id]
);
?>
@@ -268,7 +268,7 @@ echo $this->getData('nav')->render(); ?>
|
getTags(); foreach ($tags as $tag) : ?>
- = !empty($tag->icon) ? '' : ''; ?>= $this->printHtml($tag->getL11n()); ?>
+ = empty($tag->icon) ? '' : ''; ?>= $this->printHtml($tag->getL11n()); ?>
|
diff --git a/Theme/Backend/task-single.tpl.php b/Theme/Backend/task-single.tpl.php
index d8b3707..50035f0 100755
--- a/Theme/Backend/task-single.tpl.php
+++ b/Theme/Backend/task-single.tpl.php
@@ -76,7 +76,7 @@ echo $this->getData('nav')->render(); ?>
data-tpl-text-path="/0/response/description"
data-value="">= $task->description; ?>
getTags(); foreach ($tags as $tag) : ?>
- = !empty($tag->icon) ? '' : ''; ?>= $this->printHtml($tag->getL11n()); ?>
+ = empty($tag->icon) ? '' : ''; ?>= $this->printHtml($tag->getL11n()); ?>
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php
index b5d36a8..1230768 100755
--- a/tests/Bootstrap.php
+++ b/tests/Bootstrap.php
@@ -381,7 +381,7 @@ function phpServe() : void
// Execute the command and store the process ID
$output = [];
- echo \sprintf('Starting server...') . \PHP_EOL;
+ echo 'Starting server...' . \PHP_EOL;
echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL;
echo \sprintf(' %s', $command);
\exec($command, $output);
@@ -406,7 +406,7 @@ function phpServe() : void
// Kill the web server when the process ends
\register_shutdown_function(function() use ($killCommand, $pid) : void {
- echo \PHP_EOL . \sprintf('Stopping server...') . \PHP_EOL;
+ echo \PHP_EOL . 'Stopping server...' . \PHP_EOL;
echo \sprintf(' %s - Killing process with ID %d', \date('r'), $pid) . \PHP_EOL;
\exec($killCommand . $pid);
});
|