Permalink
Browse files

coding style: fixed spaces & use statements order

  • Loading branch information...
dg committed Jul 11, 2017
1 parent f2acaa7 commit 8eba981178d02a5a30ebf011d97715788cbfc80d
@@ -1,5 +1,4 @@
<?php
declare(strict_types=1);
require __DIR__ . '/../vendor/autoload.php';
@@ -1,5 +1,4 @@
<?php
declare(strict_types=1);
namespace App\Forms;
@@ -17,5 +16,4 @@ public function create(): Form
$form = new Form;
return $form;
}
}
@@ -1,5 +1,4 @@
<?php
declare(strict_types=1);
namespace App\Forms;
@@ -53,5 +52,4 @@ public function create(callable $onSuccess): Form
return $form;
}
}
@@ -1,12 +1,11 @@
<?php
declare(strict_types=1);
namespace App\Forms;
use App\Model;
use Nette;
use Nette\Application\UI\Form;
use App\Model;
class SignUpFormFactory
@@ -57,5 +56,4 @@ public function create(callable $onSuccess): Form
return $form;
}
}
@@ -1,5 +1,4 @@
<?php
declare(strict_types=1);
namespace App\Model;
@@ -78,10 +77,10 @@ public function add(string $username, string $email, string $password): void
throw new DuplicateNameException;
}
}
}
class DuplicateNameException extends \Exception
{}
{
}
@@ -1,17 +1,14 @@
<?php
declare(strict_types=1);
namespace App\Presenters;
use Nette;
use App\Model;
/**
* Base presenter for all application presenters.
*/
abstract class BasePresenter extends Nette\Application\UI\Presenter
{
}
@@ -1,5 +1,4 @@
<?php
declare(strict_types=1);
namespace App\Presenters;
@@ -9,7 +8,6 @@
class Error4xxPresenter extends BasePresenter
{
public function startup()
{
parent::startup();
@@ -25,5 +23,4 @@ public function renderDefault(Nette\Application\BadRequestException $exception)
$file = __DIR__ . "/templates/Error/{$exception->getCode()}.latte";
$this->template->setFile(is_file($file) ? $file : __DIR__ . '/templates/Error/4xx.latte');
}
}
@@ -1,5 +1,4 @@
<?php
declare(strict_types=1);
namespace App\Presenters;
@@ -41,5 +40,4 @@ public function run(Nette\Application\Request $request): Nette\Application\IResp
require __DIR__ . '/templates/Error/500.phtml';
});
}
}
@@ -1,19 +1,13 @@
<?php
declare(strict_types=1);
namespace App\Presenters;
use Nette;
use App\Model;
class HomepagePresenter extends BasePresenter
{
public function renderDefault()
{
$this->template->anyVariable = 'any value';
}
}
@@ -1,12 +1,10 @@
<?php
declare(strict_types=1);
namespace App\Presenters;
use Nette;
use Nette\Application\UI\Form;
use App\Forms;
use Nette\Application\UI\Form;
class SignPresenter extends BasePresenter
@@ -51,5 +49,4 @@ public function actionOut()
{
$this->getUser()->logout();
}
}
@@ -1,5 +1,4 @@
<?php
declare(strict_types=1);
header('HTTP/1.1 503 Service Unavailable');
@@ -1,12 +1,11 @@
<?php
declare(strict_types=1);
namespace App\Router;
use Nette;
use Nette\Application\Routers\RouteList;
use Nette\Application\Routers\Route;
use Nette\Application\Routers\RouteList;
class RouterFactory
@@ -19,5 +18,4 @@ public static function createRouter(): RouteList
$router[] = new Route('<presenter>/<action>', 'Homepage:default');
return $router;
}
}
@@ -1,5 +1,4 @@
<?php
declare(strict_types=1);
if (!isset($_SERVER['argv'][3])) {
@@ -31,7 +31,6 @@ class ExampleTest extends Tester\TestCase
{
Assert::true(TRUE);
}
}
@@ -264,7 +264,6 @@
];
/**
* Gets the boolean value of a configuration option.
* @param string configuration option name

0 comments on commit 8eba981

Please sign in to comment.