Skip to content

Commit eef6150

Browse files
committed
fixed coding style
1 parent fe02343 commit eef6150

File tree

6 files changed

+12
-15
lines changed

6 files changed

+12
-15
lines changed

src/Bridges/ApplicationDI/ApplicationExtension.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use Nette;
1111
use Nette\Application\UI;
12+
use Composer\Autoload\ClassLoader;
1213

1314

1415
/**
@@ -40,7 +41,7 @@ class ApplicationExtension extends Nette\DI\CompilerExtension
4041
public function __construct($debugMode = FALSE, array $scanDirs = NULL, $tempDir = NULL)
4142
{
4243
$this->defaults['scanDirs'] = (array) $scanDirs;
43-
$this->defaults['scanComposer'] = class_exists('Composer\Autoload\ClassLoader');
44+
$this->defaults['scanComposer'] = class_exists(ClassLoader::class);
4445
$this->defaults['catchExceptions'] = !$debugMode;
4546
$this->debugMode = $debugMode;
4647
$this->tempFile = $tempDir ? $tempDir . '/' . urlencode(__CLASS__) : NULL;
@@ -134,7 +135,7 @@ private function findPresenters()
134135
}
135136

136137
if ($config['scanComposer']) {
137-
$rc = new \ReflectionClass('Composer\Autoload\ClassLoader');
138+
$rc = new \ReflectionClass(ClassLoader::class);
138139
$classFile = dirname($rc->getFileName()) . '/autoload_classmap.php';
139140
if (is_file($classFile)) {
140141
$this->getContainerBuilder()->addDependency($classFile);

src/Bridges/ApplicationLatte/TemplateFactory.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
/**
44
* This file is part of the Nette Framework (https://nette.org)
5-
*
65
* Copyright (c) 2004 David Grudl (https://davidgrudl.com)
7-
*
8-
* For the full copyright and license information, please view
9-
* the file license.txt that was distributed with this source code.
106
*/
117

128
namespace Nette\Bridges\ApplicationLatte;

tests/Application.DI/ApplicationExtension.scan.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ test(function () {
2828

2929
$container = new Container1;
3030
$tags = $container->findByTag('nette.presenter');
31-
Assert::count(1, array_keys($tags, 'NetteModule\ErrorPresenter'));
32-
Assert::count(1, array_keys($tags, 'NetteModule\MicroPresenter'));
31+
Assert::count(1, array_keys($tags, NetteModule\ErrorPresenter::class));
32+
Assert::count(1, array_keys($tags, NetteModule\MicroPresenter::class));
3333
Assert::count(0, array_keys($tags, Nette\Application\UI\Presenter::class));
3434
});
3535

tests/Application.Latte/Template.filters.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $template = new Template($engine);
1515

1616
Assert::exception(function () use ($template) {
1717
@$template->length('abc');
18-
}, 'LogicException', "Filter 'length' is not defined.");
18+
}, LogicException::class, "Filter 'length' is not defined.");
1919

2020
$engine->addFilter('length', 'strlen');
2121

tests/Application.Routers/LinkGenerator.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ namespace ModuleModule {
3535

3636
namespace {
3737

38-
use Nette\Http,
39-
Nette\Application\LinkGenerator,
40-
Nette\Application\PresenterFactory,
41-
Nette\Application\Routers,
42-
Tester\Assert;
38+
use Nette\Http;
39+
use Nette\Application\LinkGenerator;
40+
use Nette\Application\PresenterFactory;
41+
use Nette\Application\Routers;
42+
use Tester\Assert;
4343

4444

4545
$pf = new PresenterFactory;

tests/Application/MicroPresenter.response.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,5 +179,5 @@ test(function () {
179179
]));
180180

181181
Responder::render($response);
182-
}, '\RuntimeException', "Missing template file '$filename'.");
182+
}, RuntimeException::class, "Missing template file '$filename'.");
183183
});

0 commit comments

Comments
 (0)