Skip to content

Commit 9490cc2

Browse files
committed
Fixed uses
1 parent 7a76495 commit 9490cc2

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/Codeception/Module/Nette.php

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,23 @@
22

33
namespace Codeception\Module;
44

5+
use Codeception\Util\Framework;
6+
use Nette\Configurator;
7+
use Nette\InvalidStateException;
8+
use Nette\DI\Container;
9+
use Nette\DI\MissingServiceException;
10+
use Nette\Loaders\RobotLoader;
511
use Nette\Utils\Validators;
12+
use RecursiveDirectoryIterator;
13+
use RecursiveIteratorIterator;
614

7-
class Nette extends \Codeception\Util\Framework
15+
class Nette extends Framework
816
{
917

10-
/** @var \Nette\DI\Container */
18+
/** @var Container */
1119
protected $container;
1220

13-
/** @var \Nette\Loaders\RobotLoader */
21+
/** @var RobotLoader */
1422
private $robotLoader;
1523

1624
/**
@@ -42,7 +50,7 @@ public function _beforeSuite($settings = array())
4250
$tempDir = $this->config['tempDir'] . DIRECTORY_SEPARATOR . $suite;
4351

4452
self::purge($tempDir);
45-
$configurator = new \Nette\Config\Configurator();
53+
$configurator = new Configurator();
4654
$configurator->setTempDirectory($tempDir);
4755
$configurator->addParameters(array(
4856
'container' => array(
@@ -75,20 +83,20 @@ public function grabService($service)
7583
{
7684
try {
7785
return $this->container->getByType($service);
78-
} catch (\Nette\DI\MissingServiceException $e) {
86+
} catch (MissingServiceException $e) {
7987
$this->fail($e->getMessage());
8088
}
8189
}
8290

8391
private function detectSuiteName($settings)
8492
{
8593
if (!isset($settings['path'])) {
86-
throw new \Nette\InvalidStateException('Could not detect suite name, path is not set.');
94+
throw new InvalidStateException('Could not detect suite name, path is not set.');
8795
}
8896
$directory = rtrim($settings['path'], DIRECTORY_SEPARATOR);
8997
$position = strrpos($directory, DIRECTORY_SEPARATOR);
9098
if ($position === FALSE) {
91-
throw new \Nette\InvalidStateException('Could not detect suite name, path is invalid.');
99+
throw new InvalidStateException('Could not detect suite name, path is invalid.');
92100
}
93101
return substr($directory, $position + 1);
94102
}
@@ -102,7 +110,7 @@ protected static function purge($dir)
102110
if (!is_dir($dir)) {
103111
mkdir($dir);
104112
}
105-
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::CHILD_FIRST) as $entry) {
113+
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::CHILD_FIRST) as $entry) {
106114
if (substr($entry->getBasename(), 0, 1) === '.') {
107115
// nothing
108116
} elseif ($entry->isDir()) {

0 commit comments

Comments
 (0)