Commit df48cc1f authored by Tino Goratsch's avatar Tino Goratsch

run php-cs-fixer

parent b9b952d9
......@@ -39,8 +39,7 @@ abstract class AbstractModel
EventDispatcherInterface $eventDispatcher,
DataProcessor $dataProcessor,
AbstractRepository $repository
)
{
) {
$this->eventDispatcher = $eventDispatcher;
$this->repository = $repository;
$this->dataProcessor = $dataProcessor;
......@@ -109,8 +108,7 @@ abstract class AbstractModel
protected function dispatchBeforeSaveEvent(
AbstractRepository $repository,
ModelSaveEvent $event
)
{
) {
$this->dispatchEvent(
'core.model.before_save',
$event
......@@ -141,8 +139,7 @@ abstract class AbstractModel
bool $hasDataChanges,
array $filteredData = [],
array $rawData = []
): ModelSaveEvent
{
): ModelSaveEvent {
return new ModelSaveEvent(
static::EVENT_PREFIX,
$filteredData,
......@@ -175,8 +172,7 @@ abstract class AbstractModel
protected function dispatchAfterSaveEvent(
AbstractRepository $repository,
ModelSaveEvent $event
)
{
) {
$this->dispatchEvent(
'core.model.after_save',
$event
......@@ -213,7 +209,7 @@ abstract class AbstractModel
$affectedRows = 0;
foreach ($entryId as $item) {
$affectedRows += (int)$this->repository->delete($item);
$affectedRows += (int) $this->repository->delete($item);
}
$this->dispatchEvent(
......
......@@ -58,6 +58,7 @@ abstract class AbstractNestedSetModel extends AbstractModel
* @param int|null $entryId
*
* @return bool|int
*
* @throws \Doctrine\DBAL\ConnectionException
*/
public function save(array $rawData, $entryId = null)
......@@ -95,6 +96,7 @@ abstract class AbstractNestedSetModel extends AbstractModel
* @param int|array $entryId
*
* @return int
*
* @throws \Doctrine\DBAL\ConnectionException
*/
public function delete($entryId)
......
<?php
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Core\Model;
interface UpdatedAtAwareModelInterface
{
}
......@@ -18,6 +18,7 @@ class Edit extends AbstractOperation
* @param array $updateValues
*
* @return bool
*
* @throws \Doctrine\DBAL\ConnectionException
*/
public function execute($resultId, $parentId, $blockId, array $updateValues)
......
<?php
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Modules\ACP3\Articles\Controller\Admin\Index;
use ACP3\Core\Controller\AbstractFrontendAction;
abstract class AbstractFormAction extends AbstractFrontendAction
......@@ -26,14 +26,14 @@ abstract class AbstractFormAction extends AbstractFrontendAction
$layouts = [];
foreach ($paths as $path) {
$layouts = array_merge($layouts, glob($path));
$layouts = \array_merge($layouts, \glob($path));
}
$layouts = array_map(function ($value) {
return str_replace([$this->appPath->getDesignPathInternal(), '/View/'], ['', '/'], $value);
$layouts = \array_map(function ($value) {
return \str_replace([$this->appPath->getDesignPathInternal(), '/View/'], ['', '/'], $value);
}, $layouts);
$layouts = array_combine($layouts, $layouts);
$layouts = \array_combine($layouts, $layouts);
$layouts = ['' => $this->translator->t('articles', 'default_layout')] + $layouts;
......
......@@ -42,8 +42,7 @@ class Create extends AbstractFormAction
Articles\Model\ArticlesModel $articlesModel,
Articles\Validation\AdminFormValidation $adminFormValidation,
Core\Helpers\FormToken $formTokenHelper
)
{
) {
parent::__construct($context);
$this->articlesModel = $articlesModel;
......
......@@ -72,7 +72,7 @@ class Migration extends AbstractMigration
],
43 => [
'ALTER TABLE `{pre}articles` ADD COLUMN `layout` VARCHAR(120) NOT NULL AFTER `text`;',
]
],
];
}
......
......@@ -2,7 +2,7 @@
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Modules\ACP3\Articles\Validation\ValidationRules;
......@@ -19,6 +19,7 @@ class LayoutExistsValidationRule extends AbstractValidationRule
/**
* LayoutExistsValidationRule constructor.
*
* @param \ACP3\Core\View $view
*/
public function __construct(View $view)
......
......@@ -2,7 +2,7 @@
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Modules\ACP3\Auditlog\Controller\Admin\Index;
......
<?php
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Modules\ACP3\Auditlog\Event\Listener;
......@@ -33,6 +34,7 @@ class OnModelAfterSaveListener
/**
* OnModelAfterSaveListener constructor.
*
* @param \ACP3\Core\Date $date
* @param \ACP3\Modules\ACP3\Users\Model\UserModel $userModel
* @param \ACP3\Core\Model\Repository\ModuleAwareRepositoryInterface $moduleAwareRepository
......@@ -55,11 +57,11 @@ class OnModelAfterSaveListener
if ($event->hasDataChanges() === true) {
$this->auditlogRepository->insert([
'date' => $this->date->toSQL(),
'module_id' => (int)$this->moduleAwareRepository->getModuleId($event->getModuleName()),
'entry_id' => (int)$event->getEntryId(),
'module_id' => (int) $this->moduleAwareRepository->getModuleId($event->getModuleName()),
'entry_id' => (int) $event->getEntryId(),
'action' => $this->getAction($event),
'data' => serialize($event->getData()),
'user_id' => $this->userModel->getUserId()
'data' => \serialize($event->getData()),
'user_id' => $this->userModel->getUserId(),
]);
}
}
......
......@@ -2,7 +2,7 @@
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Modules\ACP3\Auditlog\Installer;
......
......@@ -2,7 +2,7 @@
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Modules\ACP3\Auditlog\Installer;
......
<?php
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Modules\ACP3\Auditlog\Model\Repository;
use ACP3\Core\Model\Repository\AbstractRepository;
class AuditlogRepository extends AbstractRepository
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment