Skip to content

Commit 35aaaff

Browse files
authored
Move things around (#604)
1 parent 907d344 commit 35aaaff

25 files changed

+36
-39
lines changed

src/RegexChecker.php renamed to src/Configuration/RegexChecker.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Humbug\PhpScoper;
5+
namespace Humbug\PhpScoper\Configuration;
66

77
use function array_pop;
88
use function count;
@@ -15,7 +15,6 @@
1515
use function str_split;
1616
use function strlen;
1717

18-
// TODO: move this under a Configuration namespace
1918
final class RegexChecker
2019
{
2120
// https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php

src/Configuration/SymbolsConfigurationFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Humbug\PhpScoper\Configuration;
66

7-
use Humbug\PhpScoper\RegexChecker;
87
use Humbug\PhpScoper\Symbol\NamespaceRegistry;
98
use Humbug\PhpScoper\Symbol\SymbolRegistry;
109
use InvalidArgumentException;

src/Container.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
namespace Humbug\PhpScoper;
1616

1717
use Humbug\PhpScoper\Configuration\ConfigurationFactory;
18+
use Humbug\PhpScoper\Configuration\RegexChecker;
1819
use Humbug\PhpScoper\Configuration\SymbolsConfigurationFactory;
1920
use Humbug\PhpScoper\Scoper\ScoperFactory;
21+
use Humbug\PhpScoper\Symbol\Reflector;
2022
use PhpParser\Lexer;
2123
use PhpParser\Parser;
2224
use PhpParser\ParserFactory;

src/PhpParser/TraverserFactory.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414

1515
namespace Humbug\PhpScoper\PhpParser;
1616

17-
use Humbug\PhpScoper\Configuration\SymbolsConfiguration;
1817
use Humbug\PhpScoper\PhpParser\NodeVisitor\NamespaceStmt\NamespaceStmtCollection;
1918
use Humbug\PhpScoper\PhpParser\NodeVisitor\Resolver\IdentifierResolver;
2019
use Humbug\PhpScoper\PhpParser\NodeVisitor\UseStmt\UseStmtCollection;
21-
use Humbug\PhpScoper\Reflector;
2220
use Humbug\PhpScoper\Scoper\PhpScoper;
2321
use Humbug\PhpScoper\Symbol\EnrichedReflector;
2422
use Humbug\PhpScoper\Symbol\SymbolsRegistry;

src/Scoper/ScoperFactory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
namespace Humbug\PhpScoper\Scoper;
1616

1717
use Humbug\PhpScoper\Configuration\Configuration;
18-
use Humbug\PhpScoper\Configuration\SymbolsConfiguration;
1918
use Humbug\PhpScoper\PhpParser\TraverserFactory;
20-
use Humbug\PhpScoper\Reflector;
2119
use Humbug\PhpScoper\Scoper\Composer\AutoloadPrefixer;
2220
use Humbug\PhpScoper\Scoper\Composer\InstalledPackagesScoper;
2321
use Humbug\PhpScoper\Scoper\Composer\JsonFileScoper;
2422
use Humbug\PhpScoper\Symbol\EnrichedReflector;
23+
use Humbug\PhpScoper\Symbol\Reflector;
2524
use Humbug\PhpScoper\Symbol\SymbolsRegistry;
2625
use PhpParser\Parser;
2726

src/Symbol/EnrichedReflector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Humbug\PhpScoper\Symbol;
66

77
use Humbug\PhpScoper\Configuration\SymbolsConfiguration;
8-
use Humbug\PhpScoper\Reflector;
98
use function strpos;
109

1110
/**

src/Reflector.php renamed to src/Symbol/Reflector.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
* file that was distributed with this source code.
1515
*/
1616

17-
namespace Humbug\PhpScoper;
17+
namespace Humbug\PhpScoper\Symbol;
1818

19-
use Humbug\PhpScoper\Symbol\SymbolRegistry;
2019
use JetBrains\PHPStormStub\PhpStormStubsMap;
2120
use function array_keys;
2221
use function array_merge;

tests/Configuration/ConfigurationSymbolsConfigurationFactoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Humbug\PhpScoper\Configuration;
66

7-
use Humbug\PhpScoper\RegexChecker;
87
use Humbug\PhpScoper\Symbol\NamespaceRegistry;
98
use Humbug\PhpScoper\Symbol\SymbolRegistry;
109
use InvalidArgumentException;

tests/RegexCheckerTest.php renamed to tests/Configuration/RegexCheckerTest.php

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

33
declare(strict_types=1);
44

5-
namespace Humbug\PhpScoper;
5+
namespace Humbug\PhpScoper\Configuration;
66

7-
use Humbug\PhpScoper\RegexChecker;
7+
use Humbug\PhpScoper\Configuration;
88
use PHPUnit\Framework\TestCase;
99

1010
/**
11-
* @covers \Humbug\PhpScoper\RegexChecker
11+
* @covers \Humbug\PhpScoper\Configuration\RegexChecker
1212
*/
1313
final class RegexCheckerTest extends TestCase
1414
{
1515
private RegexChecker $regexChecker;
1616

1717
protected function setUp(): void
1818
{
19-
$this->regexChecker = new RegexChecker();
19+
$this->regexChecker = new Configuration\RegexChecker();
2020
}
2121

2222
/**

tests/Console/Command/AddPrefixCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
use Fidry\Console\Application\SymfonyApplication;
1818
use Fidry\Console\Command\SymfonyCommand;
1919
use Humbug\PhpScoper\Configuration\ConfigurationFactory;
20+
use Humbug\PhpScoper\Configuration\RegexChecker;
2021
use Humbug\PhpScoper\Configuration\SymbolsConfigurationFactory;
2122
use Humbug\PhpScoper\Console\Application;
2223
use Humbug\PhpScoper\Container;
2324
use Humbug\PhpScoper\FileSystemTestCase;
2425
use Humbug\PhpScoper\PhpParser\FakeParser;
25-
use Humbug\PhpScoper\Reflector;
26-
use Humbug\PhpScoper\RegexChecker;
2726
use Humbug\PhpScoper\Scoper\Scoper;
27+
use Humbug\PhpScoper\Symbol\Reflector;
2828
use InvalidArgumentException;
2929
use Prophecy\Argument;
3030
use Prophecy\PhpUnit\ProphecyTrait;

0 commit comments

Comments
 (0)