diff --git a/src/admin/apis/AdminController.php b/src/admin/apis/AdminController.php
index 1713e3f9..6f5204c9 100644
--- a/src/admin/apis/AdminController.php
+++ b/src/admin/apis/AdminController.php
@@ -203,7 +203,7 @@ public function actionControllerActions($module, $controller)
/**
* Get actions for a given controller.
- *
+ *
* @param object $controller
* @since 2.0.0
* @see Replace with luya core object helper
diff --git a/src/admin/apis/NavController.php b/src/admin/apis/NavController.php
index e71ffb68..362f0764 100644
--- a/src/admin/apis/NavController.php
+++ b/src/admin/apis/NavController.php
@@ -343,16 +343,16 @@ public function actionCreateModule()
}
$create = $model->createModule(
- $parentNavId,
- $navContainerId,
- $this->postArg('lang_id'),
- $this->postArg('title'),
- $this->postArg('alias'),
- $this->postArg('module_name'),
+ $parentNavId,
+ $navContainerId,
+ $this->postArg('lang_id'),
+ $this->postArg('title'),
+ $this->postArg('alias'),
+ $this->postArg('module_name'),
$this->postArg('description'),
- $this->postArg('controller_name'),
- $this->postArg('action_name'),
- $this->postArg('action_params', [])
+ $this->postArg('controller_name'),
+ $this->postArg('action_name'),
+ $this->postArg('action_params', [])
);
if (is_array($create)) {
Yii::$app->response->statusCode = 422;
@@ -368,12 +368,12 @@ public function actionCreateModuleItem()
$create = $model->createModuleItem(
$this->postArg('nav_id'),
$this->postArg('lang_id'),
- $this->postArg('title'),
- $this->postArg('alias'),
+ $this->postArg('title'),
+ $this->postArg('alias'),
$this->postArg('module_name'),
$this->postArg('description'),
- $this->postArg('controller_name'),
- $this->postArg('action_name'),
+ $this->postArg('controller_name'),
+ $this->postArg('action_name'),
$this->postArg('action_params', [])
);
if (is_array($create)) {
diff --git a/src/admin/apis/RedirectController.php b/src/admin/apis/RedirectController.php
index 1a8999ed..3fe707ad 100644
--- a/src/admin/apis/RedirectController.php
+++ b/src/admin/apis/RedirectController.php
@@ -19,9 +19,9 @@ class RedirectController extends \luya\admin\ngrest\base\Api
/**
* Find a redirect object for a given path info.
- *
+ *
* An example using path would be: Yii::$app->request->pathInfo
- *
+ *
* url: https://example.com/hello/world
* path: hello/world
*
diff --git a/src/admin/importers/BlockImporter.php b/src/admin/importers/BlockImporter.php
index 5595dfd1..cd7d8b52 100644
--- a/src/admin/importers/BlockImporter.php
+++ b/src/admin/importers/BlockImporter.php
@@ -119,7 +119,6 @@ protected function handleBlockDefintionInDirectories(array $directories, $blockD
{
$results = [];
foreach ($directories as $directoryPath) {
-
$path = rtrim($directoryPath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . ltrim($blockDefinition, DIRECTORY_SEPARATOR);
$path = $this->replaceDsSeparator($path);
diff --git a/src/admin/importers/CmslayoutImporter.php b/src/admin/importers/CmslayoutImporter.php
index b5ce940b..51d9fa69 100644
--- a/src/admin/importers/CmslayoutImporter.php
+++ b/src/admin/importers/CmslayoutImporter.php
@@ -169,7 +169,7 @@ protected function importLayoutFile($file, $aliased)
}
return $layoutItem->id;
- }
+ }
// add item into the database table
$data = new Layout();
diff --git a/src/admin/messages/ru/cmsadmin.php b/src/admin/messages/ru/cmsadmin.php
index d0b016dc..800f5e37 100644
--- a/src/admin/messages/ru/cmsadmin.php
+++ b/src/admin/messages/ru/cmsadmin.php
@@ -50,7 +50,7 @@
'menu_group_item_env_container' => 'Контейнеры',
'menu_group_item_env_layouts' => 'Макеты',
'menu_group_elements' => 'Элементы контента',
- 'menu_group_item_elements_blocks' => 'Блоки',
+ 'menu_group_item_elements_blocks' => 'Блоки',
'menu_group_item_elements_group' => 'Группы блоков',
'btn_abort' => 'Отмена',
'btn_refresh' => 'Обновить',
diff --git a/src/base/BlockInterface.php b/src/base/BlockInterface.php
index f0d3ed91..fb990c5a 100644
--- a/src/base/BlockInterface.php
+++ b/src/base/BlockInterface.php
@@ -212,17 +212,17 @@ public function getIsDirtyDialogEnabled();
/**
* This method is called whenever a block inside a placeholder is rendered.
- *
+ *
* This allows you to change the render behavior of every block inside a placeholder. An example of
* adding a wrapper div to the iteration:
- *
+ *
* ```php
* public function placeholderRenderIteration(BlockInterface $block)
* {
* return '
'.$block->renderFrontend().'
';
* }
* ```
- *
+ *
* This also allows you to determined whether the block should be rendered or not as the response is the content
* of the block inside the placholder.
*
diff --git a/src/base/InternalBaseBlock.php b/src/base/InternalBaseBlock.php
index 3aff7917..c0bedf35 100644
--- a/src/base/InternalBaseBlock.php
+++ b/src/base/InternalBaseBlock.php
@@ -433,7 +433,8 @@ public function getExtraValue($key, $default = false)
$this->getExtraVarValues();
$this->_assignExtraVars = true;
}
- return (isset($this->_extraVars[$key])) ? $this->_extraVars[$key] : $default;
+
+ return isset($this->_extraVars[$key]) ? $this->_extraVars[$key] : $default;
}
/**
@@ -483,7 +484,7 @@ public function addVar(array $varConfig, $append = false)
*/
public function getConfigPlaceholdersExport()
{
- $array = (array_key_exists('placeholders', $this->config())) ? $this->config()['placeholders'] : [];
+ $array = array_key_exists('placeholders', $this->config()) ? $this->config()['placeholders'] : [];
$holders = [];
@@ -505,7 +506,7 @@ public function getConfigPlaceholdersExport()
*/
public function getConfigPlaceholdersByRowsExport()
{
- $array = (array_key_exists('placeholders', $this->config())) ? $this->config()['placeholders'] : [];
+ $array = array_key_exists('placeholders', $this->config()) ? $this->config()['placeholders'] : [];
$rows = [];
diff --git a/src/frontend/Bootstrap.php b/src/frontend/Bootstrap.php
index 0c655bd9..f1b697e0 100644
--- a/src/frontend/Bootstrap.php
+++ b/src/frontend/Bootstrap.php
@@ -46,7 +46,6 @@ public function bootstrap($app)
// handle not found exceptions
$app->errorHandler->on(ErrorHandler::EVENT_BEFORE_EXCEPTION_RENDER, function (ErrorHandlerExceptionRenderEvent $event) use ($app) {
if ($event->exception instanceof NotFoundHttpException) {
-
$errorPageNavId = Config::get(Config::HTTP_EXCEPTION_NAV_ID, 0);
/** @var $item Item */
$item = $app->menu->find()->with(['hidden'])->where(['nav_id' => $errorPageNavId])->one();
diff --git a/src/frontend/controllers/DefaultController.php b/src/frontend/controllers/DefaultController.php
index 59460100..36bdac3a 100644
--- a/src/frontend/controllers/DefaultController.php
+++ b/src/frontend/controllers/DefaultController.php
@@ -112,6 +112,4 @@ protected function findInternalRedirect()
return false;
}
-
-
}
diff --git a/src/injectors/ActiveQuerySelectInjector.php b/src/injectors/ActiveQuerySelectInjector.php
index 5f4551c6..a031e185 100644
--- a/src/injectors/ActiveQuerySelectInjector.php
+++ b/src/injectors/ActiveQuerySelectInjector.php
@@ -58,4 +58,4 @@ public function setup()
// provide the extra data
$this->context->addExtraVar($this->varName, $this->getExtraAssignSingleData());
}
-}
\ No newline at end of file
+}
diff --git a/src/menu/Item.php b/src/menu/Item.php
index 8ec5d642..3b606199 100644
--- a/src/menu/Item.php
+++ b/src/menu/Item.php
@@ -532,9 +532,9 @@ public function getParents()
/**
* Go down to a given element which is evalutaed trough a callable.
- *
+ *
* Iterate trough parent elements until the last.
- *
+ *
* ```php
* $item = Yii::$app->menu->current->down(function(Item $item) {
* if ($item->depth == 1) {
diff --git a/src/models/Nav.php b/src/models/Nav.php
index 08bad26e..6da39cf5 100644
--- a/src/models/Nav.php
+++ b/src/models/Nav.php
@@ -257,7 +257,7 @@ public function reindex($e)
*
* This method is mainly to find all recursive children of a nav item when moving a page into a container
* all childrens requires to update its container id as well, so this method contains the data of its children
- *
+ *
* @return array An array where each entry is a Nav object
*/
public function getRecursiveChildren()
diff --git a/src/models/NavItem.php b/src/models/NavItem.php
index 2cc29c8c..01e78d3a 100644
--- a/src/models/NavItem.php
+++ b/src/models/NavItem.php
@@ -410,7 +410,7 @@ public function copyPageItem(NavItem $targetNavItem)
if ($blockItem->save()) {
// store the old block id with the new block id
$idLink[$block['id']] = $blockItem->id;
- }
+ }
unset($blockItem);
}
diff --git a/src/models/NavItemModule.php b/src/models/NavItemModule.php
index 6b213af3..93d8503d 100644
--- a/src/models/NavItemModule.php
+++ b/src/models/NavItemModule.php
@@ -18,7 +18,7 @@
* @property string $controller_name
* @property string $action_name
* @property string $action_params
- *
+ *
* @author Basil Suter
* @since 1.0.0
*/
@@ -59,11 +59,11 @@ public function init()
{
parent::init();
- $this->on(self::EVENT_AFTER_FIND, function() {
+ $this->on(self::EVENT_AFTER_FIND, function () {
$this->action_params = $this->getDecodedActionParams();
});
- $this->on(self::EVENT_BEFORE_VALIDATE, function() {
+ $this->on(self::EVENT_BEFORE_VALIDATE, function () {
$this->action_params = $this->getEncodedActionParams();
});
}
diff --git a/src/widgets/LangSwitcher.php b/src/widgets/LangSwitcher.php
index 8e328268..f75cef86 100644
--- a/src/widgets/LangSwitcher.php
+++ b/src/widgets/LangSwitcher.php
@@ -187,7 +187,7 @@ private static function getDataArray()
/**
* Prefix the current link with the dedicated host info.
- *
+ *
* Assuming hostInfoMapping is defined in composition component, the correct domain will be taken from the
* language information.
*
diff --git a/tests/src/frontend/BootstrapErrorPageTest.php b/tests/src/frontend/BootstrapErrorPageTest.php
index d8fb3453..8bb0641c 100644
--- a/tests/src/frontend/BootstrapErrorPageTest.php
+++ b/tests/src/frontend/BootstrapErrorPageTest.php
@@ -29,4 +29,4 @@ public function testBootstrap()
$this->expectException('yii\web\HeadersAlreadySentException');
$this->app->errorHandler->trigger(ErrorHandler::EVENT_BEFORE_EXCEPTION_RENDER, $event);
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/injectors/ActiveQuerySelectInjectorTest.php b/tests/src/injectors/ActiveQuerySelectInjectorTest.php
index 48fc040a..4a798514 100644
--- a/tests/src/injectors/ActiveQuerySelectInjectorTest.php
+++ b/tests/src/injectors/ActiveQuerySelectInjectorTest.php
@@ -58,7 +58,7 @@ public function testVariableNotFoundId()
{
$block = new TestBlock();
$block->setVarValues([
- 'foobar' => 2,
+ 'foobar' => 0,
]);
$injector = new ActiveQuerySelectInjector([
@@ -72,4 +72,4 @@ public function testVariableNotFoundId()
$this->assertFalse($block->getExtraValue('foobar'));
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/menu/ItemTest.php b/tests/src/menu/ItemTest.php
index bd760779..28ae16c3 100644
--- a/tests/src/menu/ItemTest.php
+++ b/tests/src/menu/ItemTest.php
@@ -140,7 +140,7 @@ public function testGoDown()
$itemWithParent = (new Query)->where(['nav_id' => 10])->one();
$this->assertSame(2, $itemWithParent->depth);
- $f = $itemWithParent->down(function(Item $item) {
+ $f = $itemWithParent->down(function (Item $item) {
if ($item->depth == 1) {
return $item;
}
@@ -148,7 +148,7 @@ public function testGoDown()
$this->assertSame(1, $f->depth);
- $this->assertFalse($itemWithParent->down(function(Item $item) {
+ $this->assertFalse($itemWithParent->down(function (Item $item) {
// just do nothing means pass all elements.
}));
}