mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-02-13 06:18:41 +00:00
Fix if for foreach while spacing
This commit is contained in:
parent
84a64c0abd
commit
d44bb370ed
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Admin;
|
namespace Modules\QA\Admin;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Admin;
|
namespace Modules\QA\Admin;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Admin\Install;
|
namespace Modules\QA\Admin\Install;
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Admin;
|
namespace Modules\QA\Admin;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabaseType;
|
use phpOMS\DataStorage\Database\DatabaseType;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Admin;
|
namespace Modules\QA\Admin;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Admin;
|
namespace Modules\QA\Admin;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA;
|
namespace Modules\QA;
|
||||||
|
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Models;
|
namespace Modules\QA\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Models;
|
namespace Modules\QA\Models;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
|
|
@ -86,7 +86,7 @@ class QAAnswerMapper extends DataMapperAbstract
|
||||||
try {
|
try {
|
||||||
$objId = parent::create($obj, $relations);
|
$objId = parent::create($obj, $relations);
|
||||||
|
|
||||||
if($objId === null || !is_scalar($objId)) {
|
if ($objId === null || !is_scalar($objId)) {
|
||||||
return $objId;
|
return $objId;
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Models;
|
namespace Modules\QA\Models;
|
||||||
|
|
||||||
use phpOMS\Stdlib\Base\Enum;
|
use phpOMS\Stdlib\Base\Enum;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Models;
|
namespace Modules\QA\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Models;
|
namespace Modules\QA\Models;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
|
|
@ -73,7 +73,7 @@ class QABadgeMapper extends DataMapperAbstract
|
||||||
try {
|
try {
|
||||||
$objId = parent::create($obj, $relations);
|
$objId = parent::create($obj, $relations);
|
||||||
|
|
||||||
if($objId === null || !is_scalar($objId)) {
|
if ($objId === null || !is_scalar($objId)) {
|
||||||
return $objId;
|
return $objId;
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Models;
|
namespace Modules\QA\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Models;
|
namespace Modules\QA\Models;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
|
|
@ -74,7 +74,7 @@ class QACategoryMapper extends DataMapperAbstract
|
||||||
try {
|
try {
|
||||||
$objId = parent::create($obj, $relations);
|
$objId = parent::create($obj, $relations);
|
||||||
|
|
||||||
if($objId === null || !is_scalar($objId)) {
|
if ($objId === null || !is_scalar($objId)) {
|
||||||
return $objId;
|
return $objId;
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Models;
|
namespace Modules\QA\Models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -57,8 +57,8 @@ class QAQuestion implements \JsonSerializable
|
||||||
|
|
||||||
public function hasAccepted() : bool
|
public function hasAccepted() : bool
|
||||||
{
|
{
|
||||||
foreach($this->answers as $answer) {
|
foreach ($this->answers as $answer) {
|
||||||
if($answer->isAccepted()) {
|
if ($answer->isAccepted()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -78,8 +78,8 @@ class QAQuestion implements \JsonSerializable
|
||||||
|
|
||||||
public function isAnswered() : bool
|
public function isAnswered() : bool
|
||||||
{
|
{
|
||||||
foreach($this->answers as $answer) {
|
foreach ($this->answers as $answer) {
|
||||||
if($answer->isAccepted()) {
|
if ($answer->isAccepted()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Models;
|
namespace Modules\QA\Models;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
|
|
@ -121,7 +121,7 @@ class QAQuestionMapper extends DataMapperAbstract
|
||||||
try {
|
try {
|
||||||
$objId = parent::create($obj, $relations);
|
$objId = parent::create($obj, $relations);
|
||||||
|
|
||||||
if($objId === null || !is_scalar($objId)) {
|
if ($objId === null || !is_scalar($objId)) {
|
||||||
return $objId;
|
return $objId;
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types = 1);
|
||||||
namespace Modules\QA\Models;
|
namespace Modules\QA\Models;
|
||||||
|
|
||||||
use phpOMS\Stdlib\Base\Enum;
|
use phpOMS\Stdlib\Base\Enum;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<?php foreach($questions as $question) : ?>
|
<?php foreach ($questions as $question) : ?>
|
||||||
<section class="box wf-100 qa-list">
|
<section class="box wf-100 qa-list">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="row middle-xs">
|
<div class="row middle-xs">
|
||||||
|
|
@ -16,7 +16,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<?php $badges = $question->getBadges(); foreach($badges as $badge) : ?>
|
<?php $badges = $question->getBadges(); foreach ($badges as $badge) : ?>
|
||||||
<span class="tag red"><?= $this->printHtml($badge->getName()); ?></span>
|
<span class="tag red"><?= $this->printHtml($badge->getName()); ?></span>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ echo $this->getData('nav')->render();
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php foreach($answers as $answer) : ?>
|
<?php foreach ($answers as $answer) : ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<section class="box wf-100">
|
<section class="box wf-100">
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ echo $this->getData('nav')->render();
|
||||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php if($c === 0) : ?>
|
<?php if ($c === 0) : ?>
|
||||||
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
|
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user