mirror of
https://github.com/Karaka-Management/oms-Knowledgebase.git
synced 2026-01-11 17:38:40 +00:00
rector fixes
This commit is contained in:
parent
e04ca97f95
commit
45d014b2fe
|
|
@ -284,9 +284,7 @@ final class ApiController extends Controller
|
||||||
*/
|
*/
|
||||||
private function createHistory(WikiDoc $doc) : WikiDocHistory
|
private function createHistory(WikiDoc $doc) : WikiDocHistory
|
||||||
{
|
{
|
||||||
$history = WikiDocHistory::createFromDoc($doc);
|
return WikiDocHistory::createFromDoc($doc);
|
||||||
|
|
||||||
return $history;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<?= Markdown::parse(\substr($doc->docRaw, 0, 500)); ?>
|
<?= Markdown::parse(\substr($doc->docRaw, 0, 500)); ?>
|
||||||
</article>
|
</article>
|
||||||
<?php $tags = $doc->getTags(); foreach ($tags as $tag) : ?>
|
<?php $tags = $doc->getTags(); foreach ($tags as $tag) : ?>
|
||||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-foot">
|
<div class="portlet-foot">
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ echo $this->data['nav']->render();
|
||||||
<article><?= $doc->doc; ?></article>
|
<article><?= $doc->doc; ?></article>
|
||||||
|
|
||||||
<?php foreach ($tags as $tag) : ?>
|
<?php foreach ($tags as $tag) : ?>
|
||||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<?php $files = $doc->getMedia(); foreach ($files as $file) : ?>
|
<?php $files = $doc->getMedia(); foreach ($files as $file) : ?>
|
||||||
|
|
|
||||||
|
|
@ -381,7 +381,7 @@ function phpServe() : void
|
||||||
|
|
||||||
// Execute the command and store the process ID
|
// Execute the command and store the process ID
|
||||||
$output = [];
|
$output = [];
|
||||||
echo \sprintf('Starting server...') . \PHP_EOL;
|
echo 'Starting server...' . \PHP_EOL;
|
||||||
echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL;
|
echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL;
|
||||||
echo \sprintf(' %s', $command);
|
echo \sprintf(' %s', $command);
|
||||||
\exec($command, $output);
|
\exec($command, $output);
|
||||||
|
|
@ -406,7 +406,7 @@ function phpServe() : void
|
||||||
|
|
||||||
// Kill the web server when the process ends
|
// Kill the web server when the process ends
|
||||||
\register_shutdown_function(function() use ($killCommand, $pid) : void {
|
\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;
|
echo \sprintf(' %s - Killing process with ID %d', \date('r'), $pid) . \PHP_EOL;
|
||||||
\exec($killCommand . $pid);
|
\exec($killCommand . $pid);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user