diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 24e6b76..1a88255 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -5,6 +5,8 @@ build: environment: php: version: 7.0.7 + variables: + NETTE: default dependencies: before: diff --git a/.travis.yml b/.travis.yml index a8448cf..bc29a80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,9 +7,11 @@ env: php: - 7.0 +before_install: + - composer self-update + before_script: - php .travis.composer.php - - composer self-update - composer install --no-interaction --prefer-source --dev script: diff --git a/composer.json b/composer.json index b4f3cd5..e647d5f 100644 --- a/composer.json +++ b/composer.json @@ -22,15 +22,17 @@ "require": { "php" : ">=7.0.0", - "nette/application" : "~2.2" + "nette/application" : "~2.3", + + "pds/skeleton" : "@dev" }, "require-dev": { - "nette/bootstrap" : "~2.3@dev", - "nette/di" : "~2.3@dev", - "nette/mail" : "~2.3@dev", - "nette/safe-stream" : "~2.3@dev", - "nette/robot-loader" : "~2.3@dev", + "nette/bootstrap" : "~2.3", + "nette/di" : "~2.3", + "nette/mail" : "~2.3", + "nette/safe-stream" : "~2.3", + "nette/robot-loader" : "~2.3", "nette/tester" : "@dev", "tracy/tracy" : "@dev" diff --git a/src/IPub/Application/UI/TRedirect.php b/src/IPub/Application/UI/TRedirect.php index 2c9309b..22dca42 100644 --- a/src/IPub/Application/UI/TRedirect.php +++ b/src/IPub/Application/UI/TRedirect.php @@ -52,12 +52,11 @@ final public function go($destination, $args = [], $snippets = []) $presenter = ($this instanceof Application\UI\Presenter) ? $this : $this->getPresenter(); if ($presenter->isAjax()) { - if ($destination === 'this') { - foreach ($snippets as $snippet) { - $this->redrawControl($snippet); - } + foreach ($snippets as $snippet) { + $this->redrawControl($snippet); + } - } else { + if ($destination !== 'this') { $this->forward($destination, $args); } diff --git a/tests/IPubTests/Application/RedirectTest.phpt b/tests/IPubTests/Application/RedirectTest.phpt index 16c4111..36a9c57 100644 --- a/tests/IPubTests/Application/RedirectTest.phpt +++ b/tests/IPubTests/Application/RedirectTest.phpt @@ -64,7 +64,7 @@ class RedirectTest extends Tester\TestCase } /** - * Set up + * {@inheritdoc} */ public function setUp() { @@ -184,7 +184,7 @@ class TestPresenter extends UI\Presenter /** * {@inheritdoc} */ - public function isAjax() + public function isAjax() : bool { if (in_array($this->action, ['ajaxRedirect', 'forward'], TRUE)) { return TRUE; diff --git a/tests/IPubTests/Application/TranslatorTest.phpt b/tests/IPubTests/Application/TranslatorTest.phpt index 9bd6fbd..3f64635 100644 --- a/tests/IPubTests/Application/TranslatorTest.phpt +++ b/tests/IPubTests/Application/TranslatorTest.phpt @@ -65,7 +65,7 @@ class TranslatorTest extends Tester\TestCase } /** - * Set up + * {@inheritdoc} */ public function setUp() { diff --git a/tests/IPubTests/bootstrap.php b/tests/IPubTests/bootstrap.php index 1934a72..9b42b67 100644 --- a/tests/IPubTests/bootstrap.php +++ b/tests/IPubTests/bootstrap.php @@ -1,5 +1,7 @@