Skip to content
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.

Commit

Permalink
- Code cleaning
Browse files Browse the repository at this point in the history
- Coding standards fixes
  • Loading branch information
akadlec committed Jan 15, 2017
1 parent 01c47d3 commit 2f42e15
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ build:
environment:
php:
version: 7.0.7
variables:
NETTE: default

dependencies:
before:
Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 4 additions & 5 deletions src/IPub/Application/UI/TRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/IPubTests/Application/RedirectTest.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class RedirectTest extends Tester\TestCase
}

/**
* Set up
* {@inheritdoc}
*/
public function setUp()
{
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/IPubTests/Application/TranslatorTest.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class TranslatorTest extends Tester\TestCase
}

/**
* Set up
* {@inheritdoc}
*/
public function setUp()
{
Expand Down
4 changes: 3 additions & 1 deletion tests/IPubTests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

define('DS', DIRECTORY_SEPARATOR);

require __DIR__ . DS . '..' . DS . '..' . DS . 'vendor' . DS . 'autoload.php';
Expand All @@ -13,7 +15,7 @@
date_default_timezone_set('Europe/Prague');

// Create temporary directory
define('TEMP_DIR', __DIR__ . DS . '..' . DS . 'tmp' . DS . (isset($_SERVER['argv']) ? md5(serialize($_SERVER['argv'])) : getmypid()));
define('TEMP_DIR', __DIR__ . '/../tmp/' . (isset($_SERVER['argv']) ? md5(serialize($_SERVER['argv'])) : getmypid()));
Tester\Helpers::purge(TEMP_DIR);
\Tracy\Debugger::$logDirectory = TEMP_DIR;

Expand Down

0 comments on commit 2f42e15

Please sign in to comment.