autofixes

This commit is contained in:
Dennis Eichhorn 2020-08-30 20:13:10 +02:00
parent 600c024659
commit 575c8ef130
5 changed files with 11 additions and 9 deletions

View File

@ -27,7 +27,7 @@ use phpOMS\Contract\ArrayableInterface;
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class EditorDoc implements ArrayableInterface, \JsonSerializable class EditorDoc implements \JsonSerializable, ArrayableInterface
{ {
/** /**
* Article ID. * Article ID.

View File

@ -29,7 +29,7 @@ echo $this->getData('nav')->render(); ?>
<form id="fEditor" method="<?= $isNewDoc ? 'PUT' : 'POST'; ?>" action="<?= UriFactory::build('{/api}editor?{?}&csrf={$CSRF}'); ?>"> <form id="fEditor" method="<?= $isNewDoc ? 'PUT' : 'POST'; ?>" action="<?= UriFactory::build('{/api}editor?{?}&csrf={$CSRF}'); ?>">
<div class="ipt-wrap"> <div class="ipt-wrap">
<div class="ipt-first"><input name="title" type="text" class="wf-100" value="<?= $doc->getTitle(); ?>"></div> <div class="ipt-first"><input name="title" type="text" class="wf-100" value="<?= $doc->getTitle(); ?>"></div>
<div class="ipt-second"><input type="submit" value="<?= $this->getHtml('Save') ?>"></div> <div class="ipt-second"><input type="submit" value="<?= $this->getHtml('Save'); ?>"></div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -29,20 +29,20 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="portlet"> <div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Documents') ?><i class="fa fa-download floatRight download btn"></i></div> <div class="portlet-head"><?= $this->getHtml('Documents'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default"> <table class="default">
<thead> <thead>
<tr> <tr>
<td class="wf-100"><?= $this->getHtml('Title') ?> <td class="wf-100"><?= $this->getHtml('Title'); ?>
<td><?= $this->getHtml('Creator') ?> <td><?= $this->getHtml('Creator'); ?>
<td><?= $this->getHtml('Created') ?> <td><?= $this->getHtml('Created'); ?>
<tbody> <tbody>
<?php $count = 0; foreach ($docs as $key => $value) : ++$count; <?php $count = 0; foreach ($docs as $key => $value) : ++$count;
$url = UriFactory::build('{/prefix}editor/single?{?}&id=' . $value->getId()); ?> $url = UriFactory::build('{/prefix}editor/single?{?}&id=' . $value->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getTitle()); ?></a> <td data-label="<?= $this->getHtml('Title'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getTitle()); ?></a>
<td data-label="<?= $this->getHtml('Creator') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a> <td data-label="<?= $this->getHtml('Creator'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a>
<td data-label="<?= $this->getHtml('Created') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a> <td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php if ($count === 0) : ?> <?php if ($count === 0) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?> <tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -20,6 +20,7 @@ namespace Modules\Editor\tests\Admin;
class AdminTest extends \PHPUnit\Framework\TestCase class AdminTest extends \PHPUnit\Framework\TestCase
{ {
protected const MODULE_NAME = 'Editor'; protected const MODULE_NAME = 'Editor';
protected const URI_LOAD = 'http://127.0.0.1/en/backend/editor'; protected const URI_LOAD = 'http://127.0.0.1/en/backend/editor';
use \Modules\tests\ModuleTestTrait; use \Modules\tests\ModuleTestTrait;

View File

@ -36,6 +36,7 @@ use phpOMS\Utils\TestUtils;
class ControllerTest extends \PHPUnit\Framework\TestCase class ControllerTest extends \PHPUnit\Framework\TestCase
{ {
protected ApplicationAbstract $app; protected ApplicationAbstract $app;
protected ApiController $module; protected ApiController $module;
protected function setUp() : void protected function setUp() : void