Fix if for foreach while spacing

This commit is contained in:
Dennis Eichhorn 2017-10-27 17:56:33 +02:00
parent 93f8dc9dd8
commit 1dcb4a33ac
11 changed files with 16 additions and 16 deletions

View File

@ -11,7 +11,7 @@
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
declare(strict_types = 1);
namespace Modules\Marketing\Admin;
use phpOMS\DataStorage\Database\DatabasePool;

View File

@ -11,7 +11,7 @@
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
declare(strict_types = 1);
namespace Modules\Marketing\Admin;
use phpOMS\DataStorage\Database\DatabasePool;

View File

@ -11,7 +11,7 @@
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
declare(strict_types = 1);
namespace Modules\Marketing\Admin\Install;
use phpOMS\DataStorage\Database\DatabasePool;

View File

@ -11,7 +11,7 @@
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
declare(strict_types = 1);
namespace Modules\Marketing\Admin;
use phpOMS\DataStorage\Database\DatabaseType;

View File

@ -11,7 +11,7 @@
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
declare(strict_types = 1);
namespace Modules\Marketing\Admin;
use phpOMS\DataStorage\Database\DatabasePool;

View File

@ -11,7 +11,7 @@
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
declare(strict_types = 1);
namespace Modules\Marketing\Admin;
use phpOMS\DataStorage\Database\DatabasePool;

View File

@ -11,7 +11,7 @@
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
declare(strict_types = 1);
namespace Modules\Marketing;
use Modules\Navigation\Models\Navigation;

View File

@ -11,7 +11,7 @@
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
declare(strict_types = 1);
namespace Modules\Marketing\Models;
use Modules\Calendar\Models\Calendar;
use Modules\Tasks\Models\Task;
@ -99,7 +99,7 @@ class Promotion
public function addTask(Task $task)
{
if($task->getId() !== 0) {
if ($task->getId() !== 0) {
$this->tasks[$task->getId()] = $task;
} else {
$this->tasks[] = $task;
@ -108,7 +108,7 @@ class Promotion
public function removeTask(int $id) : bool
{
if(isset($this->tasks[$id])) {
if (isset($this->tasks[$id])) {
unset($this->tasks[$id]);
return true;

View File

@ -11,7 +11,7 @@
* @version 1.0.0
* @link http://orange-management.com
*/
declare(strict_types=1);
declare(strict_types = 1);
namespace Modules\Marketing\Models;
use Modules\Calendar\Models\CalendarMapper;
@ -127,7 +127,7 @@ class PromotionMapper extends DataMapperAbstract
try {
$objId = parent::create($obj, $relations);
if($objId === null || !is_scalar($objId)) {
if ($objId === null || !is_scalar($objId)) {
return $objId;
}
} catch (\Exception $e) {

View File

@ -39,9 +39,9 @@ echo $this->getData('nav')->render(); ?>
<tr>
<td colspan="9"><?= $footerView->render(); ?>
<tbody>
<?php $count = 0; foreach([] as $key => $value) : $count++; ?>
<?php $count = 0; foreach ([] as $key => $value) : $count++; ?>
<?php endforeach; ?>
<?php if($count === 0) : ?>
<?php if ($count === 0) : ?>
<tr><td colspan="9" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?>
</table>

View File

@ -35,14 +35,14 @@ echo $this->getData('nav')->render(); ?>
<tr>
<td colspan="5"><?= $footerView->render(); ?>
<tbody>
<?php $count = 0; foreach($list as $key => $value) : $count++;
<?php $count = 0; foreach ($list as $key => $value) : $count++;
$url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/marketing/promotion/profile?{?}&id=' . $value->getId());?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getStart()->format('Y-m-d')); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getEnd()->format('Y-m-d')); ?></a>
<?php endforeach; ?>
<?php if($count === 0) : ?>
<?php if ($count === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?>
</table>